on 07-15-2016 1:48 PM
Hi All!
I do have a requirement to map 1 XML file containing large amount of records into a SOAP service operation call that is bulk. The target Message will be more complicated in its hierarchy than the source message.
I'm new to PI Message Mapping. I went through some tutorials and blog posts in SCN focused on contexts and queues. I understand the context concept (i.e. what it is), but queues and functions are still mistery to me (perhaps I'm so used to ABAP debugger which allows to analyse anything, and these contexts and queues are just "undebuggerable"..). So I still cannot go through my message mapping case to make it work.
Currently I'm prototyping this, so the messages shown below do not reflect 1:1 my real messages.
Here it is:
Assumptions:
- each source/Record element should create target/CardContract/BussContent element
- source/Record/newCardID should be mapped to target/CardContract/BussContent/CardID field
So far I managed to have a target message produced but only using constant value for target/CardContract/BussContent/CardID as when I simple connect newCardID and CardID - it doesn't work for more than 1 occurence of the source/Record element in the test source message.
Test data that don't work (mapping error - no value for BussContent[2]/CardID ) when I connect newCardID to CardID:
After I'll have this done - I need to take care about splitting the target message to multiple messages every x occurences of the source/Record element. But that's future and step 2 after I'm done with the current problem (I know there are blogs about splitting and multimapping).
Any hints or solutions how the GUI mapping should look like? Any context changes necessary, any functions to be used?
Thanks in advance for your help.
Regards
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thank you very much for the support - that's very much appreciated!!. I'm really surprised (positively) how much support one may expect from this PI community. Thanks again!
I'm also surprised how two solutions (Evgeniy's and Rahul's) may give the same, correct result at the end being different in terms of complexity..I still need to understand theses concepts better as otherwise I will never know.
Now let's take the issue on the next level as mentioned at the beginning. The final requirement is to have message splits. Let's say every 3 occurences of the source/Record element the message should be split and so there should be another instance of the target message created.
I mean the following:
Record1 -> MT_CardCrdAsBulk1->BussConent1
Record2 -> MT_CardCrdAsBulk1->BussConent2
Record3 -> MT_CardCrdAsBulk1->BussConent3
Record4 -> MT_CardCrdAsBulk2->BussConent1
Record5 -> MT_CardCrdAsBulk2->BussConent2
Record6 -> MT_CardCrdAsBulk2->BussConent3
and so on...
As far as I'm aware - this should be possible using a UDF function + changing the signature of the target message to 1..unbounded.
Could you guys suggest how the UDF should look like? For this particular message combination - is only one UDF required or more to split messages accordingly?
Thanks again in advance!
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg!
Please open new thread for your next requirement. It's the better way to get quick answers because forum members don't pay much attention to the threads marked as "Answered".
Regards, Evgeniy.
P.S. By the way, actualy, you don't need any UDF for splitting your source message into set of target messages upon rows count .
Hello Greg,
you need to do following mapping.
Record ----> removeContext (Node Function) -----> CardContract (Target Parent Node should have same context)
Record ----> Header
Record ----> BussContent
This will work fine.
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Greg,
You wish to pass new or old CARDID to CARDID in the target?
Try
map records->BusinessContent.
CardID->SplitByvalue(EachValue)-->CardID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.