Skip to Content

Collection of (similar or different kind of) messages is a common requirement in any landscape and we are quite familiar with how to create such patterns using ccBPM – thanks to enormous wealth available on SDN, but since the existence of Process Orchestration approach of developing BPM scenarios has changed a lot which means no more ccBPM and eventually NW BPM has to take the onus of accomplishing these requirements.

So the objective of this blog is to show how we can create collect patterns using NW BPM in Process Orchestration.

Scenario Description:

The requirement is to collect as many as messages from the Source system for a certain amount of time and once the time limit gets exceeded split the collected messages (using multimapping) and send the same to different target systems.

Note – Splitting of collected messages can be done outside BPM also.

NW BPM Solution:

  • First Message (send to BPM) will initiate the BPM instance and then active process will receive as many as source messages in an infinite loop for a specified interval of time.
  • Each subsequent Message of same type send to active BPM instance will be collected under the ‘Collect Message’ Intermediate Event (using the ‘Merge’ assignment)
  • To terminate the collection of messages, a Timer Intermediate Event with a specified interval of time has been defined so that when deadline is reached; the process stop collecting messages and send the collated messages to next step for further processing.
  • “Split_Mapping” Automated activity is used for transforming/splitting the collected messages into two different target structures.
  • “Target_Message1” and “Target_Message2” Automated activity will send output message from BPM to PI and eventually message will be delivered to Target systems.

Note – I am not explaining end to end BPM development, and the purview of this blog is very much confined to the NW BPM flow only. Having said that, in case you want to get acquainted with BPM development please refer Willam’s article on the same:

http://scn.sap.com/docs/DOC-28803

Capture.PNG

Step Properties:

Start Step ->

Capture_Start.PNG

Capture_Start.PNG

“Collect Message” IME (Intermediate Message Event) ->

Same message trigger i.e. “Start_Message” is getting used in both “Start” and “Collect Message” IME

Capture1_Collect.PNG

Source Messages are collected inside “Collect_Message” process context using “Merge” assignment

Capture2_Collect.PNG

Exclusive Choice ->

Capture.PNG

Timer Event ->

I have defined 80 seconds of time interval to collect as many as business messages

Capture_Timer.PNG

“Split_Mapping” (Automated Activity) ->

I am calling message mapping inside NW BPM process to split collected messages into two different target messages (having different structures)

For more details on how to call mapping inside BPM, please refer below article:

http://scn.sap.com/community/process-orchestration/blog/2012/06/11/using-netweaver-pi-s-mapping-in-netweaver-bpm

Capture1_Multimapping.PNG

Capture2_Multimapping.PNG

Target_Message1 (Automated Activity) ->

First target message send to PI

Capture_Target1.PNG

Target_Message2 (Automated Activity) ->

Second target message to PI

Capture_Targte2.PNG

In the next series (Part II) of this blog, i will try to explain how we can collect messages of different structures using correlation condition inside NW BPM.

To report this post you need to login first.

8 Comments

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

  1. Venkatanarayana Vagu

    Hi Amit,

    Nice blog. Regarding the Collect_Message, for assignment do we need to use the merge or append. If we use the merge how will be the logic? duplicate records will be eliminated ??

    (0) 
  2. chetan mittal

    Hi Amit,

    It seems it is not collecting the as many message as for 80 seconds. whenever new message come on intermediate message, timer get reset for 80 seconds again.

    (0) 

Leave a Reply