Model Gateway

Gateways control the way in which Sequence Flows converge and diverge within a Process. They provide a gating mechanism that either allows or blocks a Sequence Flow.

The OMG BPMN 1.1 Specification describes four types of Gateways:

  • Exclusive (XOR)
  • Inclusive (OR)
  • Complex
  • Parallel (AND)

In Enterprise Architect, three of these Gateway types can be mapped to BPEL, as per the OMG BPMN 1.1 Specification:

  • Exclusive (XOR)
  • Inclusive (OR)
  • Parallel (AND)

Exclusive Gateway

An Exclusive Gateway represents a 'fork in the road'; that is, there can be two or more alternative paths but only one can be taken. Therefore, each path is mutually exclusive (XOR). Exclusive Gateways can be one of two types:

  • Data-Based
  • Event-Based

Data-Based Exclusive Gateway

This is the commonest type of Exclusive Gateway, where the boolean expression set in the ConditionExpression Tagged Value of the outgoing Sequence Flow is evaluated to determine the flow path. In Enterprise Architect:

  • One of the outgoing Sequence Flows from the Gateway must have the ConditionType tag set to Default and the ConditionExpression tag set to empty
  • All other Sequence Flows must have the ConditionType tag set to Expression and the ConditionExpression tag set to a boolean expression.

The Default condition on an outgoing Sequence Flow ensures that at least this path is taken if all others evaluate to false.

Event-Based Exclusive Gateway

On this Gateway, the branching is based on the events (such as receiving a message) that occur at that point in the Process, rather than the evaluation of an expression. As an example (from the OMG BPMN 1.1 Specification), when a company receives a response from a customer, they perform one set of activities if the customer responds Yes and another set of activities if the customer responds No. The customers response determines which path is taken. This Gateway maps to a BPEL Pick element. When modeling this Gateway:

  • The outgoing Sequence Flow must have its ConditionType tag set to None
  • The target of the outgoing Sequence Flow must be either an:
  • Activity with TaskType tag set to Receive, or
  • Intermediate Event with Trigger set to Message or Timer.

Note:

If an Activity is the target of one outgoing Sequence Flow, then the Intermediate Event with a Message trigger must not be used.

Inclusive Gateway (OR)

With this type of Gateway, all the outgoing Sequence Flows with a condition that evaluates to true are taken. In Enterprise Architect:

  • One of the outgoing Sequence Flows from the Gateway must have the ConditionType tag set to default and the ConditionExpression tag set to empty
  • All other Sequence Flows must have the ConditionType tag set to Expression and the ConditionExpression tag set to a boolean expression.

The Default condition on an outgoing Sequence Flow ensures that at least this path is taken if all others evaluate to false.

Parallel Gateway (AND)

This Gateway provides a mechanism to create parallel flows. In Enterprise Architect, the ConditionType tag on all the outgoing Sequence Flows from this Gateway must be set to None.

Create Gateway

To create a new Gateway element in your model, follow the steps below.

  1. Open a BPEL diagram created under a BPEL Process.
  2. Drag the Gateway element from the BPMN 1.1 Core page of the Toolbox onto the diagram. The BPEL Properties dialog displays.
     
    GatewayDlg
     
  3. In the Name field, type a name for the Gateway.
  4. Click on the drop-down arrow in the Gateway field and select the required type.
  5. If you have selected Inclusive or Parallel, no further details are required.
  6. If you have selected Exclusive, in the Exclusive Type field click on the drop-down arrow and select the sub-type - Data or Event.
  7. If you have selected the sub-type Event, in the Instantiate field click on the drop-down arrow and select either True or False.

Note:

Click on the UML button if you need to define further properties of the Gateway, using the normal element Properties dialog.

Alternatively, right-click on the element and select the Properties context menu option.

  1. Click on the OK button to close the dialog.

 

To return to the BPEL Properties dialog for subsequent editing:

  • Double-click on the element in the diagram or Project Browser (the Shows Properties option must be selected in the Double click on browser panel of the Options dialog) or
  • Right-click on the element in the diagram or Project Browser and select the BPEL | BPEL Properties context menu option.