Conditional Start: Some Restrictions (7/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.
The Conditional Start feature can be complex to administer. SAP NetWeaver BPM has some particularities that ease the administration and usability of conditional start scenarios.
Prevention of Manual Process Start
In conditional start scenarios, a web service message sent to the conditional start endpoint should only be consumed by exactly one process instance. This means that a message either starts a new process instance or triggers an intermediate message event of a running process instance.
To ensure that there is at most one process instance consuming a message of a kind at any point in time, the manual start of conditional start process instances through the process repository http://<host>:<port>/nwa/bpm-repository and through the public API is disabled.
Instead, a process could be started through sending a web service message to the conditional start endpoint. The process repository provides a parameterized link to the web service navigator to allow a web service message to be sent to the conditional start endpoint. The BPM system then decides whether the web service message starts a new process instance or whether it triggers an intermediate message event.
Prevention of Multiple Active Conditional Start Process Definitions Sharing the Same Message Trigger
In SAP NetWeaver BPM, a web service endpoint is represented by a message trigger. A message trigger is reusable and can be used in multiple process definitions. This allows messages to be broadcasted to different process instances. This is not wanted in conditional start scenarios because it implements a collect pattern. Therefore, a message should always be consumed by exactly one process instance.
To ensure that only one process instance consumes a message at any point of time, there must not be more than one distinct process definition active, which shares the same message trigger as their conditional start trigger.
Thus, the activation of a development component fails when a conditional start message trigger is already used by another active conditional start process definition. The activation of a development component also fails when it contains more than one conditional start process definition, which uses the same message trigger.
Such a situation could either happen when deploying a new development component to the process server, when activating another version in the process repository (http://<host>:<port>/nwa/bpm-repository) or when updating a system, which contains multiple active process definitions that share the same message trigger for conditional start.
During design time, the process developer is supported by an automatic check in the process composer that reports an error when there are more than one conditional start process models that share the same message trigger.