Workflow Modeler (Gateways)

Gateways are used to control how Flows interact as they converge and diverge within a process. Gateways can define all the types of business process sequence flow behavior.

Exclusive Gateway

An exclusive gateway evaluates the state of the business process and channels the flow into one of the two or more mutually exclusive paths based on the condition. In the example below, an exclusive gateway controls the flow via Standard or Next day delivery depending on value of a process variable.

Image

Settings

  • Conditions : The condition for each outgoing flow should be defined separately.
    • Select the outgoing sequence flows and provide the condition based on which this path should be taken.
    • Note that the conditions should be mutually exclusive. In case of multiple match, only first matching path is taken. Use an Inclusive Gateway if all matching paths must be taken.
    • A default path can be defined by choosing Settings -> Default Flow

You can use a converging Exclusive Gateway with only a single outgoing flow that is default flow. However, this is largely only for clarity and does not impact actual flow in any way.

Inclusive Gateway

An inclusive gateway breaks the process flow into one or more paths. The setup is same as Exclusive Gateway except that an inclusive gateway evaluates all conditions and follows all sequence flows with matching conditions.

To place an inclusive gateway in the flow, select gateway and change the type (using settings icon) to inclusive gateway.

Image

It is important to place a converging inclusive gateway where all paths converge. When any path completes and reaches the converging inclusive gateway, the execution will wait till all running paths arrive at point of convergence.

Parallel Gateway

A parallel gateway is different than the previous gateways because you aren’t evaluating any condition or event. Instead, parallel gateways are used to represent multiple concurrent tasks in a business flow.

To place an inclusive gateway in the flow, select exclusive gateway and change the type (using settings icon) to inclusive gateway.

Image

In the above example both the sequence flows will execute in parallel and will synchronize at Join node. Similar to inclusive gateway, placing a converging parallel gateway is important. When all paths arrive at converging parallel gateway, the flow execution resumes further.

Event-Based Gateway

An event-based gateway is similar to an exclusive gateway because both follow exactly one path in the flow. In the case of an event-based gateway, however, the node waits for an event to occur and follow the path rather than evaluating any condition.

To place an event based gateway in the flow, select exclusive gateway and change the type (using settings icon) to event based gateway.

Image

In the example the gateway will register all the catching events attached to it and will wait for the some throw event to trigger. Based on this the rest of the events will be interrupted and the flow will continue.