cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple messages ...

former_member181967
Participant
0 Kudos

Hi,

I have a scenario where i merge to source structures into a target one. It looks like this :

<b>Source</b>

->Messages

-->Message1

--->FileA 1..1

-


>FlagS 1..ounbounded

-->Message2

--->FileB 1..1

-


>Product 1..ounbounded

-


>CodeProduct 1..1

<b>Target</b>

->Messages

-->Message1

--->FileC 1..1

-


>Product 1..ounbounded

-


>CodeProduct 1..1

-


>FlagT 1..1

So ... the occurence of FlagS is as many as FileB/Product/CodeProduct and i need to map for each occurence of FileC/Product/CodeProduct/FlagT ...

Example:

<b>Source</b>

->Messages

-->Message1

--->FileA

-


>FlagS -- S

-


>FlagS -- N

-->Message2

--->FileB

-


>Product

-


>CodeProduct -- 001

-


>Product

-


>CodeProduct -- 003

<b>Target</b>

->Messages

-->Message1

--->FileC

-


>Product

-


>CodeProduct -- 001

-


>FlagT -


S

-


>Product

-


>CodeProduct -- 003

-


>FlagT -


N

Can anyone provide me some help ?!?!?

Thanks in advance,

JMMatos

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jose,

"..the occurence of FlagS is as many as FileB/Product/CodeProduct.."

Based on the xml code tat you have posted, both the examples tat u gave have equal number of flags in message1 and product-codeproduct duo in the message2..will this be the case always?

If so, then all that you would have to do is create a target datatype as file, prdt, codeprodt, flag..and then simply map with the node function "exists". Keep the occurence of all the fields in the target message as 0 to unbounded...

Also, you're scenario is a 2:1 mapping right? can you have more than two source messages?

Regards,

Sushumna

Answers (1)

Answers (1)

former_member187339
Active Contributor
0 Kudos

Hi,

Map:

<u>Source</u>----<u>Target</u>

Product----Product

FlagS-<i>SplitByValue</i>-FlagT

CodeProduct----CodeProduct

Regards

Suraj

Former Member
0 Kudos

Hi,

Please can you try this:

Source----Target

FlagS---SplitByValue -- collapse context---FlagT

CodeProduct- splitbyvalue---CodeProduct

Regards

vijaya