11.7.4 Parallel Gateway

Parallel Gateways are used to create paths and are performed at the same time, within a Choreography flow. For details of how Parallel Gateways are used within an Orchestration Process see page 292.

Since there is no conditionality for these Gateways, they are available as-is in Choreography. They create parallel paths of the Choreography that all Participants are aware of.

The sender(s) of all the Activities after the Gateway MUST be involved in all the Activities that immediately precede the Gateway.

If there is a chain of Gateways with no Choreography Activities in between, the Choreography Activity that precedes the chain satisfies the above constraint.

Figure 11.46 shows the relationship of Choreography Activity Participants across the sides of the Parallel Gateway.

 

 

 

 

 

 

 

 

 

Participa nt A

 

 

 

 

 

 

 

 

 

Chore ograp hy

 

 

 

 

 

 

 

 

 

Task 2

Pa rticip ant A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Participa nt B

Cho reogra phy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Task 1

 

 

 

 

 

 

 

 

Participa nt C

 

 

 

 

 

 

 

 

 

Pa rticip ant B

 

 

 

 

 

 

 

 

Chore ograp hy

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Task 3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Participa nt B

Figure 11.46 – The relationship of Choreography Activity Participants across the sides of the Parallel Gateway

Figure 11.47 shows the corresponding Collaboration view of the above Choreography Parallel Gateway configuration.

358

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

A

 

 

Participant

Se nd

Recei ve

Me ssag e

M essage

 

 

 

M 1

M 3

 

Y es

Sen d

B

 

M essage

Decision?

 

Participant

 

R ece ive

 

Me ssag e

 

 

 

 

No

Sen d

 

M essage

 

 

M 2

Participant C

Recei ve M essage

Figure 11.47 – The corresponding Collaboration view of the above

Choreography Parallel Gateway configuration

The REQUIRED execution behavior of the Parallel 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 Parallel Gateway are the same, a Parallel Gateway is reflected in the sender’s Process followed by Message sending actions to the corresponding receivers.

If the senders are different, the Parallel Gateway is manifested by Sequence Flows followed by the sending action in each Process.

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

359

11.7.5 Complex Gateway

Complex Gateways can model partial merges in Business Processes where when some but not all of a set of preceding branches complete, the Gateway fires. This can be considered the discriminator/n-of-m join pattern1 and is not supported through the inclusive OR merge since it is not concerned with sets of branches, but rather branches that have tokens. Applied in Choreographies, Complex Gateways can model tendering and information canvassing use cases where requests are sent to participants who respond at different times.

Consider an e-tender that sends a request for quote to multiple service providers (e.g., warehouse storage) in a marketplace. The e-tender Process sends out requests to each service provider and anticipates their response through three Choreography Activities. The response branches merge at a Complex Gateway to model the requirement that when 66% responses have arrived, an assessment of the tender can proceed. The assessment occurs after the Complex Gateway. If the assessment reports that the reserve amount indicated by the customer cannot be met, a new iteration of the tender is made. A key issue is to ensure that the responses should not be mixed across tender iterations. A Terminate End Event ensures that all Activities are terminated, when a tender has been successful.

 

Service Provider A

 

 

 

Quote

 

 

 

Purchaser

 

 

Purchaser

Service Provider B

 

No

 

 

Request for Quote

Quote

 

Yes

 

 

Service Provider A

Purchaser

2 of 3

Sufficient

reserve

Service Provider B

 

responses

 

recieved

amount?

Service Provider C

 

Service Provider C

 

 

 

 

 

 

Quote

 

 

 

Purchaser

 

 

Figure 11.48 – An example of a Choreography Complex Gateway configuration

1. http://www.workflowpatterns.com/patterns/control/advanced_branching/wcp9.php

360

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