cancel
Showing results for 
Search instead for 
Did you mean: 

Message Transformation

Former Member
0 Kudos

Hi,

Imagine the following scenario:

I have one source message type with this structure:

<p1:MT_Out>

<field1>999999</field1>

<field2>20080116</field2>

<documents>

<document>

<field3>PDF</field3>

<field4>111</field4>

</document>

</documents>

<documents>

<document>

<field3>TXT</field3>

<field4>222</field4>

</document>

</documents>

</p1:MT_Out>

and from that source message I want to generate two other messages like this:

Message1:

<p1:MT_In>

<field1>999999</field1>

<field2>20080116</field2>

<field3>PDF</field3>

<field4>111</field4>

</p1:MT_In>

Message2:

<p1:MT_In>

<field1>999999</field1>

<field2>20080116</field2>

<field3>TXT</field3>

<field4>222</field4>

</p1:MT_In>

Which is the best way to do this?

Thanks

Pedro Leal

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Answers (3)

Answers (3)

Jitendra_Jeswan
Contributor
0 Kudos

Here is your solution

I assume the target message would be generated on the basis of <documents> segment. that is the number of target message would determined on the basis of number of <documents> segment in the source structure...

<p1:MT_In>

<field1>(1 arg)

<document>(2 arg)

<document>(3 arg)--


> UseOneAsMany(node function)->splitByValue(each value)--


><field1>(target field)

<field2>(1 arg)

<document>(2 arg)

<document>(3 arg)--


> UseOneAsMany(node function)---><field2>(target field)

<field3>----


></field3>

<field4>----


></field4>

</p1:MT_In>

Try this, if have any problem , feel free to revert back..

Regards/.

Jeet

Former Member
0 Kudos

Hi,

May be you can try NodeFunction UseOneAsMany.

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

The above link has a good description about this NodeFunction.

If it is applicable to your requirements,you can use it and see.

Regards,

Manjusha.

Former Member
0 Kudos

Hey

you can use multimapping for this

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Thanx

Aamir