Conditional Start: Under the Hood (5/7)
This blog post, as part of this blog series, refers to the recently introduced Conditional Start feature in SAP NetWeaver BPM available with SAP NetWeaver 7.3 EHP 1 SP 06 and higher.
This blog post refers to the recently introduced Conditional Start feature in SAP NetWeaver BPM available with SAP NetWeaver 7.3 EHP 1 SP 06 and higher.
As described in the blog post before, Conditional Start patterns are usually used in system centric scenarios, receiving and aggregating messages from other systems. Therefore, a quality of service has to be guaranteed to the systems with calling Conditional Start processes.
When using SAP NetWeaver BPM in a system-centric use case, there can be a problem that messages may be lost. When the message for starting a process instance and messages that will be consumed by an intermediate message event are sent within a small time frame, a message that is sent to the intermediate message event might be lost. This is because starting a process instance is an expensive and time consuming operation. During the process start the web service endpoint is not yet configured completely and the process instance cannot yet listen to the endpoint.
Figure 1: Messages are getting lost during bootstrapping of traditional processes
When an external system sends messages at a high rate to an endpoint that is used for process start and correlation, this problem is even worse. The Conditional Start process feature is designed to manage this. SAP NetWeaver BPM recognizes the start of a Conditional Start process instance. During the start-up, messages, which are sent to the intermediate message event are saved until the instance is able to receive them, when:
- they are sent to the same web service endpoint as the process instance that is currently starting
- their payload does not satisfy the correlation condition of any running process instance listening to this webservice endpoint
When the process instance is ready to receive messages, the processing of all held messages continues. If their payload satisfy the correlation condition of the started process instance, they will be assigned to it. Otherwise they will start a new process instance themselves.
This also implies that messages that may not match the currently starting process instance, but will start a new process instance themselves, are also held, as SAP NetWeaver BPM cannot predict the correlation condition of a currently starting process instance. This is up to the process model and cannot be calculated having only the payload of the message that triggered the process start.
Guaranteed message reception for Conditional Start processes needs additional processing time compared to traditional processes and thereby has an overall impact on the performance of the BPM system.
When using Conditional Start, SAP NetWeaver BPM guarantees that all messages sent to a web service endpoint used by a Conditional Start process are either starting a new process instance or be consumed by an already running process instance. The functionality increases the overall processing time for a message.