Collect Pattern in NW BPM – Part I
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.
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:
Start Step ->
“Collect Message” IME (Intermediate Message Event) ->
Same message trigger i.e. “Start_Message” is getting used in both “Start” and “Collect Message” IME
Source Messages are collected inside “Collect_Message” process context using “Merge” assignment
Exclusive Choice ->
Timer Event ->
I have defined 80 seconds of time interval to collect as many as business messages
“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:
Target_Message1 (Automated Activity) ->
First target message send to PI
Target_Message2 (Automated Activity) ->
Second target message to PI
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.