cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Process issue

Former Member
0 Kudos

Hi,

I am creating a business process for taking a multiline file, where each line serves as an input to a web service and the result of the web service is stored to an MQ.

What would be the best way to achieve the splitting of the multiline file. Is it through the Block Par Foreach? And how is this best done?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Your mapping should create N message for N lines in the file. You can do this my going to the Messages tab in Message Mapping and changing the occurence of the target message. Once your mapping created a N messages payload, use this in BPM to send out each mesasge individually using ParForEach.

Former Member
0 Kudos

Hi,

My issue is not so much for the mapping to get the multiple messages, but, how to map the multiple messages received asynchronously to the each individual message to be sent to the web service. How is this best done.

Former Member
0 Kudos

You would have to do it in a BPM. Put a ForEach block after the transformation step. There should be a sync step inside the ForEach block. If you need to do anything with the response from the webservice, you can put extra steps types after the sync step.

Former Member
0 Kudos

Thanks for the comments and help so far.

I am aware of the BPM process. I wanted a confirmation of the fact that I needed to use a foreach. Can I use a ParForeach?

Assuming that the fields come in something like this (in XML format)

<Recordset>

<Row>

<Actual Message>

</Row>

<Row>

<Actual Message>

</Row>

</Recordset>

I need to map the "Actual Message" of each row to a single "Actual Message" which will be the input to the web service.

Is this automatically done, when I mark the input message as multiline? How does the block know that it has to go through each Row? Is it using XPath or something like that?

If any of you have some examples of such a BPM, can you point me that direction. I will be very grateful.

Former Member
0 Kudos

Usage of ParForEach and ForEach depends on your business process.If you use ParForEach, there is a possibility of the Actual Messages going out of order to WebService. If that is not an issue you can use ParForEach.

Check out examples BpmPatternMulticastParallel and BpmPatternMulticastSequential which is available in the SAP BASIS software component. These sample BPM patterns are available in the namespace "http://sap.com/xi/XI/System/Patterns" under SAP BASIS software component. This would explain how BPM would know to split the message and send it in one by one.

Hope this helps and reward points if helpful.

Answers (1)

Answers (1)

Former Member
0 Kudos

You will have ForEach block, which used to take your mutiline element one by one.

Inside the your block you will have Synchronous Send Step, then you will have container operator step (append),

after you block, you have asyn send step.

Liang