Skip to Content
author's profile photo Former Member
Former Member

Graphical Message Mapping - please help

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

messages.png (48.6 kB)
tesstdata.PNG (8.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jul 18, 2016 at 05:06 AM

    Hi Greg!

    Mapping:

    Result:

    Regards, Evgeniy.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2016 at 02:09 PM

    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


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 15, 2016 at 01:51 PM

    Hello Greg,

    You wish to pass new or old CARDID to CARDID in the target?

    Try

    map records->BusinessContent.

    CardID->SplitByvalue(EachValue)-->CardID.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2016 at 09:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Evgeniy Kolmakov

      Hi Evgeniy

      Thanks for the info. After some research indeed it seems no UDF is necessary and the same could be achieved by using just standard functions, but I'm still in trouble to make it work.

      Thanks for your hint I posted another thread in the forum:

      Thanks again

      Best regards

      Greg

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.