WCP‐6: Multi‐Choice, WCP‐7: Structured Synchronizing Merge, WCP‐8: Multi Merge - MatthesElstermann/PASS-Workflow-Control-Pattern-Library GitHub Wiki
By looking closer at each of the patterns, it is clear that they are interconnected. Thats why it is easier to show the patterns together at one Use Case.
WCP-6: Multi-Choice
The branch diverges into two or more branches. It is similar to WCP-4: Exclusive Choice since the decision which branch or branches to proceed on is made at runtime. The difference is that the thread of control can be here passed to multiple branches and in WCP-4 it is only passed to one branch.¹
WCP-7: Structured Synchronizing Merge
Merging two or more branches from an earlier Multi-Choice construct to a single branch. In order to pass the thread of control to the subsequent branch, all active incoming branches must be enabled.¹
WCP-8: Multi Merge
Merging two or more branches to a single branch. The difference to WCP-7 is that in this pattern the thread of control goes immediately to the subsequent branch without waiting for the other incoming branches to be enabled.¹
Petri-Net Representation
To have a look at the Petri-Net representations, visit the workflowpatterns website
PASS Representation
For an better understanding of the patterns, an example where an Emergency hotline can despatche the police, the firefighters and the ambulance. Since this page contains three workflow control patterns (WCP-6, WCP-7 and WCP-8) not all of the following representations include all patterns. Thats why for each model it is written in the topic in brackets which pattern(s) it represents.
The first two variations demonstrate only WCP-6:
In the remaining variations WCP-6 is covered aswell as WCP-7 and WCP-8:
- Multi and Structured Synchronizing Merge within a Subject
- Multi Choice, Multi- and Structured Synchronizing Merge within a Subject with Choice Segment
- Multi Choice, Multi- and Structured Synchronizing Merge with Multi Subject.
PASS Variation 1 (WCP-6): Multi Choice within a Subject
In this image WCP-6 is modeled, the Multi Choice can be found in the SBD of the Emergency Hotline (right image). Since the Do State "Decide on action" has multiple outgoings.
PASS Variation 2 (WCP-6): Multi Choice within a Subject with Choice Segment
This model showcases WCP-6 aswell. The Multi Choice can be found in the SBD of the Emergency Hotline (right image) again. The difference in this representation is that a Choice Segment is used to model the multiple choices the subject can take. Important to note is that each of the paths is optional, so that it actually is a choice.
PASS Variation 3 (WCP-6&WCP-7&WCP-8): Multi and Structured Synchronizing Merge within a Subject
The first half of the SBD of Emergency hotline is already explained in Variation 1 and this covers WCP-6. WCP-7 can be found in the second half of the SBD of Emergency Hotline. The Receive Transition "all site reports received, commence case" makes sure that all site reports are received before continueing with the process. WCP-8 can be found in the first half of the SBD of Emergency Hotline since the three Send Transitions are merged in the "Decide on action" Do State and there is no waiting fotr other incoming branches such as in WCP-7 with "all site reports received, commence case".
PASS Variation 4 (WCP-6&WCP-7&WCP-8): Multi Choice, Multi- and Structured Synchronizing Merge within a Subject with Choice Segment
WCP-6 can be found at the start of the Choice Segment because it is multiple Choice due to the Choice Segment, same as in Variation 2. WCP-7 and WCP-8 are represented through the merge at the end of the Choice Segment and because each of the paths is optional.
PASS Variation 5 (WCP-6&WCP-7&WCP-8): Multi Choice, Multi- and Structured Synchronizing Merge with Multi Subject
WCP-6 is represented in the Send Transition because it includes cardinality. That means that the subject Emergency hotline will despatch a call to 0 till maximum 3 Emergency services which is multiple choice. WCP-7 and WCP-8 are represented in the Receive Transition which has the condition to wait for site reports from all known till it continues with the process. So there takes the merging process place.
[1] "Workflow Control Patterns." Workflow Patterns. Retrieved March 29, 2024, from https://www.workflowpatterns.com