Skip to Content
0
Former Member
Apr 12, 2010 at 11:22 AM

1 to unbounded in Message Split

88 Views

Hi Experts,

We have a requirement where we need to do a message split

based on the number of line items in the source message.

I have sucessfully managed to achieve the message split,

but the problem is trying to map the "1 to unbounded"

list section in the source message header to the

"1 to unbounded" list section in the target message

lineItem. If possible, please can you help me to achieve the

following result:

-


Source message:

-


<source>

<header>

<list>

<ref>

<rec1>r1<rec1>

<rec2>r2<rec2>

<ref>

<ref>

<rec1>r3<rec1>

<rec2>r4<rec2>

<ref>

<list>

<lineItem>

<item1>i1<item1>

<item2>i2<tem2>

<lineItem>

<lineItem>

<item1>i3<item1>

<item2>i4<item2>

<lineItem>

<source>

-


Target Message:

-


<target>

<lineItem>

<item1>

<item2>

<list>

<ref>

<rec1>

<rec2>

<ref>

<list>

<lineItem>

<target>

-


Required Result After message split:

-


<target>

<lineItem>

<item1>i1<item1>

<item2>i2<item2>

<list>

<ref>

<rec1>r1<rec1>

<rec2>r2<rec2>

<ref>

<ref>

<rec1>r3<rec1>

<rec2>r4<rec2>

<ref>

<list>

<lineItem>

<target>

<target>

<lineItem>

<item1>i3<item1>

<item2>i4<item2>

<list>

<ref>

<rec1>r1<rec1>

<rec2>r2<rec2>

<ref>

<ref>

<rec1>r3<rec1>

<rec2>r4<rec2>

<ref>

<list>

<lineItem>

<target>

-


-


At the moment the "1 to unbounded" list section is not mapping correctly.

I need a function similar to the useOneAsMany function to achieve this

because I cant get the useOneAsMany to work with the "1 to unbounded"

list section. I have tried creating my own UDF but for some reason it

only generates 1 reference record in the second target message instead of 2.

I have been struggling for ages to achieve the required result above

but still have not been successful. Any help will be appreciated very much.

Thanks and regards,

Brendon