cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping Split - Context Issue

0 Kudos

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!

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

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

0 Kudos

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.