(The notation [counter] denotes the unique name of a variable used to hold the counter value; the actual name is immaterial.)

Multi-Instance Activities

A BPMN Multi-Instance Task with a multiInstanceFlowCondition of “All” is mapped to WS-BPEL as follows.

<variable name="[counter]" type="xsd:integer"/>

...

<forEach counterName="[counter]" parallel="[isSequential? 'no':'yes' ]">

[

 

]

<startCounterValue>1</startCounterValue >

Task

= <finalCounterValue>[condition]</finalCounterValue>

 

<scope>

 

[Task]

 

</scope>

 

 

 

</forEach>

(The notation [counter] denotes the unique name of a variable used to hold the counter value; the actual name is immaterial.)

14.2.3 Events

Start Event Mappings

The following sub clauses detail the mapping of Start Events to WS-BPEL.

Message Start Events

A Message Start Event is mapped to WS-BPEL as shown in the following figure.

[

 

]

 

<receive name="[e-name]"

 

 

createInstance="yes"

 

=

partnerLink="[e-operation-interfac e]"

 

 

 

portType="[e-operation-interface]"

e

 

 

operation="[e-operation]">

 

 

</receive>

The partner link associated with the WS-BPEL receive is derived from the interface referenced by the operation of the

Message Start Event.

Error Start Events

An Error Start Event can only occur in Event Sub-Processes. This mapping is described on page 455.

Compensation Start Events

A Compensation Start Event can only occur in Event Sub-Processes. This mapping is described on page 455.

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

455

Intermediate Event Mappings (Non-boundary)

The following sub clauses detail the mapping of intermediate non-boundary Events to WS-BPEL.

Message Intermediate Events (Non-boundary)

A Message Intermediate Event can either be used in normal control flow, similar to a Send or Receive Task (for throw or catch Message Intermediate Events, respectively), or it can be used in an Event Gateway. The latter is described in more detail in “Gateways and Sequence Flows” on page 461.

The following figure describes the mapping of Message Intermediate Events to WS-BPEL.

[

 

]

 

<recei ve name="[e-name]"

 

 

createInstance="no"

 

=

partnerLink="[e-operation-interface]"

 

 

 

portType="[e-operation-interface]"

e

 

 

operation="[e-operation]">

 

 

</receive>

The partner link associated with the WS-BPEL receive is derived from the interface referenced by the operation of the

Message Intermediate Event.

Timer Intermediate Events (Non-boundary)

A Timer Intermediate Event can either be used in normal control flow, or it can be used in an Event Gateway. The latter is described in more detail in “Gateways and Sequence Flows” on page 461.

The following figure describes the mapping of a Timer Intermediate Event to WS-BPEL – note that one o the mappings shown is chosen depending on whether the Timer Event’s TimeCycle or TimeDate attribute is used.

[

 

]

=

<wait name="[e-name]" for="[e-TimeCycle]"/>

 

 

 

 

 

 

or

 

e

 

 

<wait name="[e-name]" until="[e-TimeDate]"/>

 

 

 

 

Compensation Intermediate Events (Non-boundary)

A Compensation Intermediate Event with its waitForCompletion property set to true, that is used within an Event Sub-Process triggered through an error or through compensation, is mapped to WS-BPEL as follows.

456

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

[

 

]

=

<compensate/>

 

 

 

 

 

 

or

 

e

 

 

<compensateScope target="[referencedActi vity]"/>

 

 

 

 

The first mapping is used if the Compensation Event does not reference an Activity, the second mapping is used otherwise.

End Event Mappings

The following sub clauses detail the mapping of End Events to WS-BPEL.

None End Events

A “none” End Event marking the end of a Process is mapped to WS-BPEL as shown in the following figure.

[

 

]

=

<empty name="[e-name]">

 

 

 

 

e

 

</empty>

 

 

 

 

Message End Events

A Message Start Event is mapped to WS-BPEL as shown in the following figure.

[

Q

e

]

<i nvoke name="[e-name]"

partnerLink="[Q, e-operation-interface]"

= portType="[e-operation-interface]"

operation="[e-operation]">

</invoke>

The partner link associated with the WS-BPEL invoke is derived from both the participant Q that the Message Intermediate Event is connected to by a Message Flow, and from the interface referenced by the operation of the Message Intermediate Event.

Error End Events

An Error End Event is mapped to WS-BPEL as shown in the following figure.

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

457

[

 

]

=

<throw faultName="[e-name]">

 

 

 

 

e

 

</throw>

 

 

 

 

Compensation End Events

A Compensation End Event with its waitForCompletion property set to true, that is used within an Event SubProcess triggered through an error or through compensation, is mapped to WS-BPEL as follows.

[

 

]

=

<compensate/>

 

 

 

 

 

 

or

 

e

 

 

<compensateScope target="[referencedActi vity]"/>

 

 

 

 

The first mapping is used if the Compensation Event does not reference an Activity, the second mapping is used otherwise.

Terminate End Events

A Terminate End Event is mapped to WS-BPEL as shown in the following figure.

[

 

]

<exit>

 

e

=

</exit>

 

 

 

Boundary Intermediate Events

Message Boundary Events

A BPMN Activity with a non-interrupting Message boundary Event is mapped to a WS-BPEL scope with an event handler as follows.

458

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