WCP‐3: Synchronization - MatthesElstermann/PASS-Workflow-Control-Pattern-Library GitHub Wiki
WCP-3, Synchronization, involves merging two or more parallel branches into a single subsequent branch. This pattern ensures that the execution threads of these parallel branches come together at a specific point in the process. Typically, these branches are created using the Parallel Split construct earlier in the process model. The synchronization point waits for all incoming branches to complete before passing control to the task immediately following it¹.
Petri-Net Representation
To have a look at the petri net representation visit the workflowpatterns website.
PASS Representation
In PASS, the correct use of Synchronization always involves at least two subjects, as all decision are Exclusive or. In cases where there is only one subject, it is possible to achieve a form of Synchronization by employing a prior Parallel Split through a Choice Segment. However, it is important to note that this is considered a Pseudo Parallel Split, as discussed in WCP-2, Variation 3.
In PASS, we can generally distinguish between three variations of the Synchronization:
- Synchronization Across 2 Subjects
- Synchronization Across 3 Subjects
- Synchronization with one Subject, preceded by a Pseudo Parallel Split through ChoiceSegment.
PASS Variation 1: Synchronization Across 2 Subjects
In the model above, two subjects can be seen with a message exchange from Subject 1 to Subject 2. The synchronization takes place within Subject 2 in this model, as there are initially two Control Flows, one in Subject 1 and the other in Subject 2. These are then synchronized using the Send- and Receive State linkage, so that the synchronization occurs within Subject 2, and the Control Flow continues from there.
PASS Variation 2: Synchronization Across 3 Subjects
This representation involves three Subjects. Subject 3 receives messages sequentially from Subject 1 and Subject 2. Afterward, the Control Flow continues in Subject 3, and the other two subjects reach their End States. Thus, synchronization occurs again using the Send- and Receive State linkage, specifically within Subject 3! The main difference from Variation 1 is that two Control Flows are synchronized aswll, but this time, the ongoing Control Flow takes place within a new subject.
PASS Variation 3: Synchronization with one Subject, preceded by a Pseudo Parallel Split through ChoiceSegment
The model is the same as Variation 3: Pseudo Split in WCP-2. However, this time, we are focusing on the back part, namely the synchronization. Information about the front part of the Parallel Splits can be found here. In this model, the Control Flow is separated using the Choice Segment and eventually synchronized again through the same Choice Segment. However, it is essential to be cautious with this model, as the Choice Segment is not truly executed in parallel.
[1] "Workflow Control Patterns." Workflow Patterns. Retrieved July 27, 2023, from https://www.workflowpatterns.com