If the Participant is the receiver of only one such Message, that is also consumed through a receive following the Event-Based Gateway. This is because the Participant Process does not know whether it will receive a Message (since the Gateway entails a choice of outcomes).

11.7.2 Event-Based Gateway

As described above, the Event-Based Gateway represents a branching point in the Process where the alternatives are based on Events that occur at that point in the Process, rather than the evaluation of expressions using Process data. For details of how Event-Based Gateways are used within an Orchestration Process see “Event-Based Gateway” on page 296.

These Gateways are used in Choreography when the data used to make the decision is only visible to the internal Processes of one Participant. That is, there has been no Message sent within the Choreography that would expose the data used to make the decision. Thus, the only way that the other Participants can be aware of the results of the decision is by the particular Message that arrives next.

On the right side of the Gateway: either the senders MUST to be the same; or the receivers MUST to be the same.

After the first Choreography Activity occurs, the other Choreography Activities for the

Gateway MUST NOT occur.

Message Intermediate Events MUST NOT be used in the Event-Based Gateway.

Timer Intermediate Events MAY be used, but they restrict the participation in the Gateway.

For relative timers: All Participants on the right side of the Gateway MUST be involved in the

Choreography Activity that immediately precedes the Gateway.

For absolute timers (full time/date): All Participants on the right side of the Gateway MUST be involved in the Choreography Activity that immediately precedes the Gateway.

Signal Intermediate Events MAY be used (they are visible to all Participants). No other types of Intermediate Events are allowed.

 

P articipant A

 

C horeography

 

T ask 2

 

P articipant B

P articipant A

P articipant A

 

D e cicio n ?

C horeography

C horeography

T ask 1

T ask 3

P articipant B

P articipant B

Figure 11.38 – An example of an Event Gateway

Figure 11.39 displays the corresponding Collaboration view of the above Choreography Event Gateway configuration.

Business Process Model and Notation (BPMN), v2.0.2

349

 

 

Yes

Receive

A

 

 

Message

 

 

 

Participant

Send

 

 

Message

 

 

 

Receive

 

 

 

 

 

No

Message

 

 

M1

M2

M3

 

Yes

Send

 

 

 

Message

 

B

Decision?

 

 

Participant

 

 

Receive

 

 

Message

 

 

 

 

 

 

 

 

Send

 

 

No

Message

Figure 11.39 – The corresponding Collaboration view of the above Choreography Event Gateway configuration

The REQUIRED execution behavior of the Event-Based Gateway and associated Choreography Activities are enforced through the Business Processes of the Participants as follows:

Each Choreography Activity and the Sequence Flow connections is reflected in each Participant Process.

If the senders following the Gateway are the same, the Event-Based Gateway is reflected as an Exclusive Gateway in that Participant’s Process. This is because the choice of which Message to send is determined by the same Participant. If the senders are different, sending occurs through different Processes.

If the receivers are the same, the senders can be the same or different. In this case, the Event-Based Gateway is reflected in the receiver’s Process, with the different Message receives following the Gateway.

If the receivers are different, the senders need to be the same. The Event-Based Gateway is reflected for different receiver Processes such that the respective receive follows the Gateway. A time-out can be used to ensure that the Gateway does not wait indefinitely.

350

Business Process Model and Notation (BPMN), v2.0.2

11.7.3 Inclusive Gateway

Inclusive Gateways are used for modeling points of synchronization of a number of branches, not all of which are active, after which one or more alternative branches are chosen within a Choreography flow. For example, one of more branches MAY be activated upstream, in parallel, depending on the nature of goods in an order (e.g., large orders, fragile goods orders, orders belonging to pre-existing shipment contracts), and these are subsequently merged. The point of merge results in one or more risk mitigating outcomes (e.g., special insurance protection needed, special packaging needed, and different container categories needed). Inclusive Gateways are also used within an Orchestration Process see page 291.

Like Exclusive Gateways, Inclusive Gateways are used in a Choreography, but they are constrained by the lack of a central mechanism to store the data that will be used in the Condition expressions of the Gateway’s outgoing Sequence Flows. Choreographies MAY contain natural language descriptions of the Gateway’s Conditions to document the one more alternative paths of the Choreography (e.g., “special insurance protection needed,” “special packaging needed,” and different “container category needed”), but such Choreographies would be underspecified and would not be enforceable. To create an enforceable Choreography, the Gateway Conditions MUST be formal Condition Expressions. In general the following rules apply for the Expressions.

Like the enforceability of the Exclusive Gateway, the Inclusive Gateway in a Choreography requires that the data in the Expressions of the outgoing Sequence Flows of the Gateway be available to the initiators of the

Choreography Activities of outgoing Sequence Flows. This means that the initiators of these Choreography Activities should also be senders or receivers of Messages in Choreography Activities immediately preceding the Gateway. The major difference, however, is that the synchronizing behavior of the Inclusive Gateway can only be enforced through one participant. Hence, the rules for enforceability are as follows:

The data used for Gateway Conditions MUST have been in a Message that was sent prior to (upstream from) the

Gateway.

More specifically, all Participants that are directly affected by the Gateway MUST have either sent or received the Message(s) that contained the data used in the Conditions.

Furthermore, all these Participants MUST have the same understanding of the data. That is, the actual values of the data cannot selectively change after a Participant has seen a Message. Changes to data during the course of the Choreography MUST be visible to all the Participants affected by the

Gateway.

Merge: In order to enforce the synchronizing merge of the Gateway, the sender of the Choreography Activity after the Gateway MUST participate in the Gateway immediately preceding the Gateway. This ensures that the merge can be enforced. (This relies on the assumption of logical atomicity of a Choreography Activity, otherwise the rule would require that all receivers are the same so that the Gateway is enforced in the receiver’s Process only).

Split: In order to enforce the split side of the Gateway, the initiators of all Choreography Activities immediately following the Gateway MUST be the same as the common sender or receiver of Choreography Activities preceding the Gateway. The sender(s) of all the Choreography Activities after the Gateway

MUST be involved in all the Choreography Activities that immediately precede the Gateway.

Figure 11.40 shows an example of a Choreography with an Inclusive Gateway. The Gateway is enforced in the corresponding Business Processes of the Participants involved. For the merge behavior to be enforced, the initiator of Choreography Activities immediately following the Gateway participates in the Choreography Activities immediately preceding the Gateway.

Business Process Model and Notation (BPMN), v2.0.2

351

M1

Participant A

Choreography

Task 1

Participant B

Participant D

Choreography

Task 1

M2

Participant B

Participant C

M3

Choreography

 

Task 1

 

Participant B

 

Figure 11.40 – An example of a Choreography Inclusive Gateway configuration

352

Business Process Model and Notation (BPMN), v2.0.2

Participant A

Send

Message

 

M1

 

 

Receive

 

B

Message

 

Participant

 

Send

 

Message

Receive

 

 

 

 

Message

 

 

M2

M3

Participant C

Send

Message

Participant D

Receive

Message

Figure 11.41 – The corresponding Collaboration view of the above Choreography Inclusive Gateway configuration

Figure 11.42, a variation of Figure 11.40 above, shows an example of a Choreography illustrating the enforcement of the split behavior of the Inclusive Gateway. For the split behavior to be enforced, the initiators of Choreography Activities immediately following the Gateway and the receiver of Choreography Activities immediately preceding the Gateway are the same Participant (i.e., A).

Business Process Model and Notation (BPMN), v2.0.2

353

 

Participant A

Condition 1

Choreography

 

Task 2

Participant A

Participant C

Decision?

 

Choreography

 

Task 1

 

Participant B

Participant A

 

Choreography

Condition 2

Task 3

 

Participant C

Figure 11.42 – An example of a Choreography Inclusive Gateway configuration

354

Business Process Model and Notation (BPMN), v2.0.2

 

 

Condition 1

Send

A

 

 

 

Message

 

Decision?

 

 

Participant

Receive

 

 

 

 

 

Message

 

 

 

 

 

Send

 

 

 

 

 

 

 

Condition 2

Message

 

 

 

 

 

 

M1

 

M2

M3

B

 

 

 

 

Participant

Send

 

 

 

Message

 

 

 

 

 

Condition 1

Receive

C

 

 

 

Message

 

Decision?

 

 

Participant

 

 

 

 

 

Receive

 

 

 

 

 

 

 

Condition 2

Message

 

 

 

 

 

Figure 11.43 – The corresponding Collaboration view of the above Choreography

Inclusive Gateway configuration

Business Process Model and Notation (BPMN), v2.0.2

355

 

Participant A

Condition 1

Choreography

 

Task 2

Participant A

Participant C

Decision?

 

Choreography

 

Task 1

 

Participant B

Participant A

 

Choreography

Condition 2

Task 3

 

Participant D

Figure 11.44 – Another example of a Choreography Inclusive Gateway configuration

356

Business Process Model and Notation (BPMN), v2.0.2

Participant D

Condition 1

 

Receive

 

 

Message

Decision?

Condition 2

 

 

 

 

M3

 

 

Condition 1

Send

A

 

 

 

Message

 

Decision?

 

 

Participant

Receive

 

 

 

 

 

Message

 

 

 

 

 

Send

 

 

 

 

 

 

 

Condition 2

Message

 

 

 

 

 

 

M1

 

M2

 

B

 

 

 

 

Participant

Send

 

 

 

Message

 

 

 

Participant C

Condition 1

Decision?

 

Receive

Condition 2

Message

 

Figure 11.45 – The corresponding Collaboration view of the above Choreography Inclusive Gateway configuration

Business Process Model and Notation (BPMN), v2.0.2

357