Skip to Content
0

Message Mapping Split - Context Issue

Feb 07, 2017 at 06:26 PM

79

avatar image
Former Member

Hello,

I have a message mapping that I want to split into separate messages, and I am getting stuck on the appropriate context changes. I have done message splits before, but it was always splitting into individual records. This time I have a need to split records based a value change.

I want to split messages based on <ID> value changes, where each message gets all <row> nodes that contain that operation. Example:

Origin Message:

<MT_Origin>
  <Recordset>
    <row>
      <ID>D111</ID>
      <Op>1</ID>
    </row>
    <row>
      <ID>D111</ID>
      <Op>2</ID>
    </row>
    <row>
      <ID>D222</ID>
      <Op>1</ID>
    </row>
    <row>
      <ID>D222</ID>
      <Op>2</ID>
    </row>
    <row>
      <ID>D222</ID>
      <Op>3</ID>
    </row>
<MT_Origin>

I want my destination message to be (I'm excluding <Messages><Message1>...):

<MT_Destination>
  <Recordset>
    <row>
      <ID>D111</ID>
      <Op>1</ID>
    </row>
    <row>
      <ID>D111</ID>
      <Op>2</ID>
    </row>
</MT_Destination>
<MT_Destination
    <row>
      <ID>D222</ID>
      <Op>1</ID>
    </row>
    <row>
      <ID>D222</ID>
      <Op>2</ID>
    </row>
    <row>
      <ID>D222</ID>
      <Op>3</ID>
    </row>
</MT_Destination>

So, for mapping to MT_Destination (which does the message split), I was thinking I need to use something like:
ID-->removeContexts-->SplitByValue(ValueChange)-->MT_Destination

But stuck on getting that to work in conjunction with mapping for <row>.

Thanks for your help!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Feb 08, 2017 at 05:41 AM
0

Hi,

As you trying to do the message splitting, first you need to change the occurrence in signature tab

you need to do the below mapping for MT_Destination

by doing the above changes, You will get the target structure as expected.


1capture.jpg (31.4 kB)
2capture.jpg (16.0 kB)
3capture.jpg (12.2 kB)
3capture.jpg (80.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Feb 08, 2017 at 04:39 PM
0

Thank you Manoj. I did have that set already, but was having trouble with the context changes. I did get this figured out though.

On the MT_Destination mapping i used:

ID-->removeContexts-->SplitByValue(Value Change)-->collapseContexts-->MT_Destination


and for the Row:

ID-->removeContexts-->SplitByValue(Value Change)-->row

Share
10 |10000 characters needed characters left characters exceeded