ColiceK
ColiceK

Reputation: 23

How to properly implement a terminating end event that can trigger at any point during the process?

I’m currently modeling a process with 2 exception statuses (a patient dies & No Neurologist found).

If no Neurologist is found (this can only happen once in my process), the process stops. Another exception status is triggered when a patient dies at any point during the process. If this exception status occurs, the process stops.

I have difficulties modeling these exception statuses. Attached you can find my current attempt. I’m not 100% sure it is correct.

Example of my attempt

Upvotes: 2

Views: 2179

Answers (1)

rob2universe
rob2universe

Reputation: 7583

Terminating events are rarely needed. There are usually more elegant, clearer solution than this 'kill all switch'. Their purpose is to terminate any parallel activities / consume any tokes which exist in the same scope. The same can usually be achieved with interrupting (e.g. conditional) boundary events, which get triggered e.g. by a data change. A boundary event makes it clearly visible in the process where a cancellation can occur, under which circumstances, and allows ending a process in more controlled manner.

In your particular use case (diagram you attached) you don't need to use the terminating events at all. You are using two interrupting boundary events (escalation and error) on a scope created by the embedded sub process. The scope of the embedded sub process is already terminated when these events interrupting occur. A subsequent terminating event in the parent process' scope would cancel everything in this scope. In your case the parent scope is the root process instance, but since there is no token flow parallel to the embedded sub process, there is nothing to cancel.

Also see:

Upvotes: 2

Related Questions