Join
A join mode can have multiple incident edges but only one outgoing edge. In the Unified Modeling Language, a join node is a control node used within an activity diagram to control the synchronization of multiple incoming flows of control. It is used to represent a point in the workflow where multiple paths converge.
-
Convergence
Multiple incoming control flows converge at the join node. Each incoming flow typically represents a separate path of execution represented as arrows within the diagram.
-
Synchronization / Continuation
Here the node only implements the AND synchronization such that all nodes need to arrive at the synchronization point when only one control flow continues the execution. Once all control flows reached the join node one control flow continues the execution along the outgoing path from the join node.
-
Memory
The memory of the different control flows is combined, hence variables from different processes need to be stored with distinct names to be accessible after the join occurred.
-
Decisions
It may happen that you modelled two incident edges in the system that originate from the same thread, they may have split due to a decision. The join node waits until the number of threads that visit the node equals the number incident edges before it continues.
Override the wait count
Currently there is no static analysis implemented that may decide how many threads need to visit the join until the workflow continues. You can therefore override the number of incident edges to wait for by simply setting an integer in the parameter, e.g. '2' instead of three incoming edges if you know there is one execution less than incoming paths. See the merge and or synchronization below.
In summary, a UML join node is used to coordinate the flow of control in an activity diagram by ensuring that multiple paths converge and synchronize before continuing. It is a control flow element that helps model complex workflow scenarios where synchronization or convergence of multiple activities is required.
The join node used here does not implement additional features of the UML specification;
-
No MERGE and OR synchronization
The join node has an associated join specification, which defines the criteria that must be met for the join to occur. The below criteria are defined in UML but only the AND join is currently supported:
-
AND-Join: All incoming flows must be enabled for the join node to proceed.
-
OR-Join: Any one of the incoming flows being enabled is sufficient for the join node to proceed.
-
Merge-Join: The join node simply merges all incoming flows without any specific criteria.
-
-
No conditional waiting
As each incoming control flow reaches the join node, it is only checked whether the last control flow has reached it (barrier synchronization). No checks whether certain specified join condition(s) are met are performed.