cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with multi-mapping

Former Member
0 Kudos

Hello! I need to develop scenario like in blog: /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

but I need to have sets of records. For example, I have 9 "Element2" records in original message.

So, I need to have 3 messages, each contains 3 records of "Element2".

How can I do this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Andrey,

Try this,

Element2->Index(In Statistics function)

Compare the output of Index with constants 0,1,2.

Next step is to use if-then. If it is true you'll send the Subelement.

Similarly you check for 3,4,5 and 6,7,8 for the remaining 2 message types.

Regards,

Vishal

Former Member
0 Kudos

Change the occurance of target message type to 0..unbounded in Messages Tab in mapping for 1:n mapping.

Mapping for Piyush_msg_out_3 target node-

Element2 (source)-> Index(increment 1) -> Divide by Constant (3 in your case) -> Floor -> Split By value(Value chnaged) -> collapse contexts -> Piyush_msg_out_3

Change the occurance of Element2 node as 1..unbounded in target data type.

Mapping for Element2-

Element2 (source)-> Index(increment 1) -> Divide by Constant (3 in your case) -> Floor -> Split By value(Value chnaged) -> Element2(target)

Edited by: nagarjuna _s on Nov 5, 2009 7:41 AM

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

If you sorce emssage had 9 Element 2 records,you want split this one in to 3 individual messages,using multi mapping we can achive this,you need to write one user defined function to count and return 3 elements as one message,but you ned to write logic in user defined function and return it.i think it will work it out.

how you are going to write the logic is up to your programming skils.

Regards,

Raj