on 10-23-2006 5:47 AM
I am trying to merge multiple (in my case 2) inputs based on a correlation ( I am just following the using the BpmPatternCollectPayload provided by SAP)
It works, but the output has only the first message.
For example
My first message is
<ID>100</ID>
<PO>
<ItemNumber>Item1</ItemNumber>
<ItemPrice>25</ItemPrice>
</PO>
second message is
<ID>100</ID>
<PO>
<ItemNumber>Item2</ItemNumber>
<ItemPrice>35</ItemPrice>
</PO>
the output is same as the first message
But I am expecting output as
<ID>100</ID>
<PO>
<ItemNumber>Item1</ItemNumber>
<ItemPrice>25</ItemPrice>
</PO>
<PO>
<ItemNumber>Item2</ItemNumber>
<ItemPrice>35</ItemPrice>
</PO>
Do I need to do any complex mapping or can I get the desired result using simple mapping?
Any help will be appreciated.
Thanks
Hi,
Mapping is not complex but you mus ensure that:
a) in interface mapping you have source occurency to many
b) in message mapping you can duplicate target structure and map fields one to one with corresponding source
Regards,
Wojtek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That link is good information. Thanks.
But the problem with my scenario is, I have 2 source messages, so I am not sure how to test that in message mapping or interface mapping!! Also since there is a correlation involved, I am not sure if we can mimic the correlation in message mapping test.
Yes the PO element is 0..unbounded.
Hi ,
For your requirement you need to collect the source messages using BPM with Payload collect pattern and process all the messages whose ID is "100"
You need to set a block condition where all the messages with 100 will get collected and when ever there is any change in ID it should process all the source data as a single message .
Please chcek what condition you have on collection block .
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
what you need to do is check if for your souce structure root node is 0.. unbounded, than the target root node should be 1.
then for the source to target mapping for <po> use the node function remove context and assign to target. i think this solves your problem you will get single entry.
any more clarifications contact me.
thanks,
raju N.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
As you mentioned you are using BPM collect pattern dependent on payload you should get the data merged as you expected.
Please check the condition ( Correlation condition ) to collect and exit the collection .
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.