Exclusive event-based gateway

1. Overview

An exclusive event-based gateway is an exclusive OR operator where alternative paths of a process are determined by events (such as a message, timer, or condition).

Simply put, this operator enables you to make decisions based on certain events.

event based gw 01

An exclusive event-driven gateway must have at least two output sequence flows. The output control flows of this gateway should be associated only with Intermediate Catching Events or Receive Tasks.

The Platform supports two event types for event-based gateways: Timer and Message, plus a Receive Task.

When the gateway is activated, the process waits for the gateway to select one of the events. The business process flow is directed by the branch where the event occurred or the task was completed first. The rest of the events are ignored.

2. Modeling an exclusive event-based gateway

To model a business process using an exclusive event-based gateway, perform these steps:

  1. Open the Camunda Modeler app and create a new BPMN diagram by clicking the BPMN diagram button.

    A new diagram window opens.

    bp 1

  2. Model a start event and a task of any type (for example, a user task).

  3. Attach and configure an Event-based Gateway element:

    • From the toolbar on the left, drag the Create Gateway element to the diagram canvas.

      event based gw 1

    • Select the event, click the wrench icon (Change type), and select the Event based Gateway item from the menu.

      event based gw 2

    • Select the gateway one more time and switch to the properties panel.

    • Enter a gateway name (optional) and attach one of the available elements:

      • ReceiveTask;

      • MessageIntermediateCatchEvent;

      • TimeIntermediateCatchEvent;

      • ConditionIntermediateCatchEvent;

      • SignalIntermediateCatchEvent.

        An event-based gateway element can only interact with Intermediate Catching Events or Receive Tasks.

        event based gw 3 1

As a result, an exclusive event-based gateway is configured.

An example of a business process using an exclusive event-based gateway

event based gw 4