Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
*Graphical Mapping in PI for Message Splitting with some additional conditions: (File to Web Service Scenario)*  Objective: The Objective is to split a file into multiple files and send those files to different web service depending on the certain value of the multiple occurring node of the source structure. Here, I am only showing the procedure to split file and the graphical mapping used to split file. Graphical mapping of my blog is completely different from the referenced blog. Splitting is done based on conditions (described in "Conditions for Splitting"). Also, Enhanced receiver determination is used to stop the error "Message split produced no messages" of Moni. Also, RFC Lookup has been performed through udf. (all in same scenario) Solution: File splitting can also be done using enhanced receiver determination (If target structure is different for each receiver). In that case, we need to create different message mapping for each different type of target structure. But if the target structure is same (for each receiver) then Single message mapping can be used to split source structure. Since in our case, our target structure is same for all receivers so we are following this approach only.      In the following source structure, we need to split the source structure depending upon the occurrence of Routing Data node. For each Routing Data node, one Target Item will be created which will contain one Routing Data node’s values and other node under Item.  Source Structure:Two Required Target Structure: 1^st^ Structure:2^nd^ Structure:  Conditions for Splitting: a)      Target Structure will not be created if Domain values under Routing Data node are invalid. (Validity of Domain values checked through RFC Lookup) b)      If SyndicationWF value is “C” in the source structure then target Structure will be created for each Routing Data node. c)       If SyndicationWF value is “H” in the source structure then target Structure will be created for only those Routing Data node whose “ChangedRoutingsSTamp” is greater than “lastSyndicationStamp”.  “ChangedRoutingsSTamp” and “lastSyndicationStamp” are in Time Stamp format. d)      After Splitting, particular web service will be called depending on the Domain value of Routing Data node.(not described here)  1.       _Mechanism/Process of File Splitting:_  The occurrence of external message is used to be 1 in the Signature tab. But for Splitting, we need to change the occurrence of Target Message from 1 to 0…unbounded.      After changing Target Message from 1 to 0…unbounded in the signature tab, Structure of Source and Target looks like this:      _Mapping for Item node:_          _Mapping for sending ItemNumber to multiple Item nodes depending on Routing Data node length:_  In the Source Structure, the occurrence of ItemNumber and SyndicationWF is 1. But in the Target Structure, It has to go to all created Item depending on the occurrence of Routing Data node.              _Mapping for Domain and other fields of Routing Data Node:_ Mapping for all the nodes under Routing Data Node is 1:1.   _Split Message Mapping Test after graphical mapping:_                                                                           2.       _Enhanced Receiver Determination_  (a)  If no node gets created on the Target side in above split mapping then error “Message split produced no messages” is thrown in sxmb_moni. (b)  To stop this error message, we used enhanced receiver determination. (c)  Receiver node is only created when node is created in the split message mapping. If no node is created in the split mapping then receiver is also not created in the extended mapping. So Mapping for “Item” in MM_ROUTING_SPLT and “Receiver” in MM_ROUTING_EXTENDED is same. (d) Also, we need to  specify “Ignore” in receiver determination if no receiver is found.  _Creating Receiver according to Condition:_ _Mapping for Receiver_              _Mapping for Service node (Assigning business system):_    _Receiver Determination in  ID:_