Skip to Content


Message splitting and mapping of one source message to more than one target messages is required at many times. Some typical scenario is that we have a element in input message and based on the value of that element, a node of the input has to be mapped to one of the output message types.


Now consider this scenario. The input message is as follows.                     




Based on the value of the element(name), the node of input(details)should be directed to one of the two message types.                     


Input Message type                     




Output Message types                     






Create the Message Interfaces and also the corresponding Abstract Interfaces to work with BPM.                     


Message Mapping                     


Message Mapping is very crucial. We have to map single source Message Type to Two Target Message Types. Click on the Messages tab in the Mapping Editor and choose the messages that are involved in the mapping both at the source and at the target side.                     




Once this is done we can see the set of messages involved in the mapping in the graphical editor. We can now perform mapping as usual. I have just used a user defined function that maps every element of the input message type to one of the two output message types based on value of element name.                     



Interface Mapping


Create the corresponding Interface Mapping and all the interfaces in involved are abstract.                     




Integration Process                     


The Mapping or the transformation that we have used requires an Integration Process. Create an integration process.                     




1. Receive step is invoked after start step which receives the input interface (inputabs) for the input file.                     


2. Transformation step: The transformation step has got one input (inputabs) and two outputs (outputabs , outputabs1)depending on the element value.                     


3. A fork steps then branches in to two branches.                     


Branch 1:                     


A Receiver Determination step returns set of receivers configured for the outputabs interface in the directory and puts it into receiver which is a multiline container receiver element.                     


A send Step sends the output to the corresponding receiver that is got from the receiver element receiver.                     


Branch 2:                     


A Receiver Determination step returns set of receiver configured for the outputabs interface in the directory and puts it into receiver1 which is a multiline container receiver element.                     


A send Step sends the output to the corresponding receiver that is got from the receiver element receiver1.                     


4. The fork step completes its operation and terminates in to the stop step.                     




Create sender agreement for the input file.                     


Receiver Determination plays a key role.                     


Three Receiver Determinations are required. One for the Sender to BPM and two others for BPM to the corresponding output files. In the Interface Determination for the two Receivers, specify the corresponding Interfaces.                        


Create Receiver agreements for the output files.                     


Input File:                     




Output Files:                     






I hope this blog gives you a clear idea how to use BPM in message split.                     

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Saravana Kumar Kuppusamy
    Sudarshan, Have you tried the 1:n split with the target message occurences as 0..unbounded instead of 1. Ascenario where in we do not know beforehand the number of target messages generated. In ur case , it is always 2 messages i beleive!! I remember trying this sometime back , but did not work . But, in our case target was IDOC and so we could get it to work with IDOC packages.It will be good to know whether it worked in your case ?


    1. Sudharshan Aravamudan Post author
      Hi Saravana,
      I have not tried the scenario that you have quoted.Do you want n different message Types(dynamic)or known(predefined)number of Message Types MTs with varied occurences.So clarify if the n messages are of same type or different. To best of my knowledge i feel that the number of message types must be known in advance and only their occurences may vary.
        1. Sudharshan Aravamudan Post author

          Could u elaborate ur requirement. As per my understanding u have single message at input and u want to call multiple RFCs at the other end.

          If ur RFC call is asynchronous and u have XI SP>15, u can do this with multi mapping without BPM.


    1. Sudharshan Aravamudan Post author

      Hi Sridevi,<br/>Thankx for the comments.<br/>Two user Defined Fns are required:<br/>1.selectnodeifA<br/>2.selectNodeifB<br/>The first fn passes a node if the name is A and second fn passes if the name is B(with respect to blog fields).<br/>Both the functions have two arguments Name, Node and fns are taken in Queue.<br/><br/>First fn<br/>selectnodeifA<br/>   //write your code here<br/> for(int i=0;i<Name.length;i+)<br/>{<br/>if(Name[i].equals(“A”))<br/>result.addValue(Node[i]);<br/>}<br/>Second fn<br/>selectnodeifB<br/>   //write your code here<br/>    //write your code here<br/> for(int i=0;i<Name.length;i+)<br/>{<br/>if(Name[i].equals(“B”))<br/>result.addValue(Node[i]);<br/>}<br/><br/>In mapping<br/>(bpm_in_MT/Details,bpm_in_MT/Details/Name)selectnodeifAbpm_outMT/info.<br/><br/>(bpm_in_MT/Details/Name,bpm_in_MT/Details/Name)selectnodeifA–splitbyvaluebpm_outMT/info/Name.<br/><br/>(bpm_in_MT/Details/Name,bpm_in_MT/Details/Age)selectnodeifAsplitbyvaluebpm_outMT/info/Age.<br/><br/><br/><br/>(bpm_in_MT/Details,bpm_in_MT/Details/Name)selectnodeifBbpm_out1_MT/info.<br/><br/>(bpm_in_MT/Details/Name,bpm_in_MT/Details/Name)selectnodeifB–splitbyvaluebpm_out1_MT/info/Name.<br/><br/>(bpm_in_MT/Details/Name,bpm_in_MT/Details/Age)selectnodeifBsplitbyvaluebpm_out1_MT/info/Age.<br/><br/>Input to fn is given as (xxx,yyy)where they are given as first and second arguments respectively.<br/><br/>Hope it helps.<br/><br/>Note:The above can be done with out user defined functions also.Its just one of the methods.<br/><br/>Regards,<br/>Sudharshan.<br/><br/><br/><br/><br/><br/>

      1. Uday Suvvada
        Hi Sudhakar,
        wheni executed ur code it is showing error ” illegal start of expression” .please send me the
        correct code.I need it urgently  becoz my requirement is same as you mentioned in the blog.
  2. sudeep dhar
    U have used a receiver determination Step in the BPM before the send steps, whats the use of that,
    I have tried the same scenario earlier wirhout this receiver determination step, but it didnt work…may be coz of that……..

    can u explain me the use of that step

    1. Sudharshan Aravamudan Post author
      Hi Sudeep,

      The Receiver determination step explicitly returns the list of receivers Configured for the Integration Process for a Particular Receiver Interface from Directory.You can use this receiver in subsequent Send Step.

      Say for example u need to send Messages to two different receivers with two different Interfaces, u would have used two receiver determinations from BPM to the two receivers(two different Interfaces)in Directory.
      To identify/select the receiver(that is configured in ID )we use the Receiver Determination Step explicitly in BPM.
      Hope this helps.

      Sudharshan N A

      1. Mahesh Reddy

        I tried FILE 2 File Multimapping Through BPM. i got problem

        i.e, FIle is Pickingup from Sender File Adapter and message is entering into the, i can able to see the message upto recive step in the BPM but,its showing error in Transfermation Step.

        so, wht is the solution for above problem?

        WIth Reagards,

  3. S. Gokhan Topcu
    Nice blog and clear explanation.
    But, as discussed, from PI SP14, 1:N mapping is also possible without BPM.

    And instead of UDF in your case, the node function createif with a equalS text function for generating target fields is sufficient.

    I don’t think this blog really resembles the extensive uses of BPM multi-mapping, rather it is a simple usage case to demonstrate referencing a multi mapping from BPM.


    1. S. Gokhan Topcu
      I forgot to mention;

      How is it possible to use a send step with receivers from a receiver list that is not inside a block for dynamic processing? I’ve tried this configuration with your exact settings and 4 different receiver with 2 for each interface, but the outbound message gets stuck inside the BPM with the message “message scheduled on outbound side”.. guess we do need blocks..


Leave a Reply