Gateways

A gateway, represented as a diamond shape, represents a branching of sequence flows, typically based on some condition. A gateway does not make a decision, but merely tests some data or event condition.

Gateway Type

BPMN defines several gateway types, selected using the Change Shape context menu applied to the Exclusive Gateway shape:

gateway type 1

Gateways may be splitting (diverging) or merging (converging), meaning either one sequence flow in, multiple out, or multiple sequence flows in, multiple out. A gateway with multiple in and multiple out, while not forbidden, is ambiguous and not recommended. (It is not allowed by Method and Style rules.)

The important gateway types are Exclusive, Inclusive, Parallel, and Event Exclusive. The others are rarely used.

  • Exclusive. The Exclusive gateway, more commonly called the XOR gateway, is the most common. In a splitting XOR gateway, only one outgoing sequence flow, or gate, is selected by the gateway’s data condition. A merging XOR gateway is allowed if the incoming sequence flows are never active in parallel. The XOR gateway is unusual in that it may be rendered either with an X marker visible or no marker inside the diamond. Whichever convention is used, it should be used consistently.

  • Inclusive. The Inclusive gateway, also called the OR gateway, represents conditionally parallel flow. In a splitting OR gateway, more than one gate condition may be true, and all gates with true conditions are enabled in parallel. A merging OR gateway waits for all incoming sequence flows enabled in the process instance to arrive before completing.

  • Parallel. The Parallel gateway, also called the AND gateway, represents unconditionally parallel flow. In a splitting AND gateway, all gates are enabled unconditionally and their flows run in parallel. A merging AND gateway waits for all incoming sequence flows to arrive before completing.

  • Event Exclusive. An Event Exclusive gateway, more commonly called an event gateway, is similar to a splitting Exclusive gateway, except that the enabled gate is not determined by a data condition. Instead, each gate has a catching event (or possibly Receive task), and the event that occurs first is the gate enabled. It is typically used to wait for either an incoming message flow or a timeout, whichever comes first.