Dynamically Start Parallel Process Instances in SAP BPM
Dynamically Start Parallel Process Instances in SAP BPM
Introduction: SAP BPM provides the myriad of possibilities to integrate and orchestrate between multiple systems and applications. The orchestration could be system-centric or human centric depending on the business requirements. However, the business requirements could pose an integration challenge that requires thorough knowledge of SAP BPM implementation. This article provides a unique insight on how to start multiple process instances
Challenge: Business requirement is such that message duplication and clustering of messages towards C4C application needs to be achieved. The situation is such that; for every process instance started, it has an intermediate timer event (ITE) of 5mins. During the 5mins duration, collect pattern with an intermediate message event (IME) is implemented to collect messages belonging to the same functional location.
Set-up and Configuration
- Create a BPM process development component in NWDS with below example (detailed steps on this will not be provided, other blogs have addressed this already)
2. Configure Message Start Event: Configure the message start event with service interface and leave the default condition.
3. Configure Intermediate Message Event: Configure the intermediate message event with a condition, this condition is defined dynamically, by comparing the incoming value in a specific field and a locally stored field in the Data Object (DO) while the process instance is running.
All messages that match the stored “Functional location value” are checked again via the steps modelled in the process above, and only none-duplicated messages are collected and appended to the Data Object which is a list of values.
Note: If the condition on the IME is not fulfilled, the process server starts a new process instance, which means multiple process instances can be started in parallel for the period of the timer event
Condition: string-equal(incomingString,locallyStoredStringInDO)
Conclusion: Prior to this blog, in the process of development, the information available were practically focused on defining conditions for intermediate message event based on a combination of fixed and dynamic values. This blog has highlighted the possibilities of defining conditions for message event dynamically and starting multiple instances of the same process in parallel.
Written by: Abidemi Olatunbosun
Contributions: Kas Timsi and Ronan Mol
for the start event, what value you are comparing??????????? the process is not started, you say "while the process instance is running."
Hi Jun,
Thanks for your observation, this has been updated for proper understanding.
If you have additional comments, you could share them again.
Regards,
Abidemi
what you are trying to say in this blog?seems nothing to me......
your condition is fixed. not dynamic.....
Please read well, to understand the blog, the condition for the intermediate message event is dynamic, as it is not harded coded, it changes per process instance. If the new incoming message does not satisfy the condition on the intermediate message event, a new process instance is started. I would advise the appropriate words are used if you want to drop comments.
it is supposed to be like this. no one is going to use a hardcoded value in IME.
your blog tile is misleading also.
Then I think you do not understand what the blog is about, and your comments are not needed here. I have informed you to read SAP Guide on using harded coded values,
https://help.sap.com/saphelp_nw73ehp1/helpdata/en/a0/5aebbe5fd8444ab68fe4bfd9f9ad8b/frameset.htm
but since you do not want to, but just want to spill out unprofessional words, then no need comment on this further with you
you completely don’t understand BPM.
That’s my comment. I know you are not comfortable being challenged.
you can convey some basic stuff, it is not a problem
but your blog title and content really don’t match.
perhaps You completely don’t understand basic stuffs about BPM, so fix that,
People who read and understand do appreciate the blog.
Hi A. Olatunbosun,
As I understand the BPM in the image, it is a collector pattern with deduplication capabilities?
You call an EJB to handle deduplication. However, you are using EJB on the first message only. Can you explain that bit, please?
Also, what do you mean by parallel process?
Thanks for sharing your experience.
Regards,
Fatih
Hi Fatih,
Thanks for your comments and here are my inputs on your remarks
-On the EJB call (Java proxy), we were only calling the EJB at the start to check deduplication and used the "if-else" statement on the mapping step to check if a message has been collected already or not, but with more testing, we later discovered that the condition wasn't enough, so the better option was to do the EJB call(CallEJB2) again after the IME (updated diagram). We also understood that this might have impact on SAP PRO, so since the EJB is also deployed as service on SAP PRO, we decided to configure the EJB calls automated step to call the service directly (this is was done by configuring the Service Group in NWA==>Application Communication with the EJB WSDL and endpoint)
-Starting a parallel process: When a message is sent towards the BPM, a process instance is started and the process instance keeps running for the period of 5minutes set in the timer event, when new messages are sent, the condition on the IME checks if that message should be collected, and if the condition is not fulfilled, this message starts a new process instance. This means the first instance is still running and waiting to collect messages that meets the IME condition, while the second is also running and many instances can be started for as long as you send messages that does not meet the condition on the IME of the first instance.
Hope I am able to provide the clarifications, if there still more questions, do reply.
Thanks,
Abidemi
A. Olatunbosun
Your valuable thought son this please.
https://answers.sap.com/questions/12907416/how-to-collect-and-group-records-by-loop-count-in.html
Advance thanks!!