3.6. Gateways

Gateways make it possible to provide multiple paths of execution through a process. There are two types of gateways: diverging gateways and converging gateways. Diverging gateways create branches in processes, and converging gateways close the branches by merging them back together.
It is possible to branch processes in the following ways:
  • AND (Parallel)
    The flow of control continues along all outgoing connections (branches) simultaneously.
  • XOR (Exclusive)
    The flow of control continues along only one of the outgoing connections. The connection with the constraint with the lowest priority number that evaluates to true is selected. For information about defining constraints see Section 3.8, “Constraints”. At least one of the outgoing connections must evaluate to true at runtime, or the process will throw an exception at runtime.
This image shows the multiple paths of a gateway.

Figure 3.2. Diverging Gateway

A diverging gateway has one incoming connection and two or more outgoing connections. A diverging gateway contains the following properties:
  • ID: The ID of the node (which is unique within one node container).
  • Name: The display name of the node.
  • Type: AND or XOR.
  • Constraints: The constraints linked to each of the outgoing connections (exclusive and inclusive gateways).
This image depicts the multiple diverging gateways and their various connections.

Figure 3.3. Converging Gateway

A converging gateway has two or more incoming connections and one outgoing connection. A converging gateway contains the following properties:
  • ID: The ID of the node (which is unique within one node container).
  • Name: The display name of the node.
  • Type: AND or XOR.
Depending on the type of diverging gateway used, the converging gateway will behave in different ways:
  • When a parallel (AND) split was used, the converging gateway will wait for all incoming branches to be completed before continuing.
  • When an exclusive (XOR) split was used, the converging gateway will continue as soon as the one incoming branch has completed.

Note

Inclusive (OR) gateways are not currently supported.