BPMN Implementation: Receive task, Message catch event
When a BPEL processing engine gets a message, it searches for a receive (or pick) activity with a matching partner link and operation. For an executable process, the receive must specify an input variable or variable part for the message data received. See
for descriptions of concepts important to this activity.
The receive activity can begin a business process instance by including a
property set to Yes. A receive activity can be associated with a reply activity if the operation is a request-response. Additionally, the receive can include a message exchange attribute.
You can create a set of concurrent initial receives. This case allows for any one message of a set to initialize a BPEL process. To create a multiple-activity starting point, add the receives to a flow container. Also, you must provide a correlation set for all concurrent receives that initiate a process, as described in
Adding Correlations to an Activity
Two other activities are similar to a receive: an onMessage clause in a pick activity or and onEvent event handler. For more information, refer to
Participant (Partner Link)
Selecting Activity Labels
Variable (required only for executable process, not abstract process)
From Part to Variable. See
From Part to Variable
Create Instance. Required if this is the start activity.
Join Condition. See
Creating a Join Condition for an Incoming Link
Viewing the Execution State of an Activity or Link
Message Exchange Declaration
Extension Attributes and Extension Elements. See
Declaring Extension Elements and Attributes
To add a receive activity to the process manually:
For a shortcut and recommended technique, see
Creating an Activity by Starting with a WSDL Interface
Message catch event
activity to the Process Editor canvas.
You can add a background color to the receive task, but not the message catch event.
In the Properties view, select the following values:
Optionally type in a Name.
In the Participant drop-down, select
New Process Service Consumer
Select an Operation from the picklist.
In the Data tab, do one of the following:
Select Single Variable from the Assignment Type and create a new variable or select a process variable.
Create a Parts to Variables specification. For details, see
From Part to Variable
Create an XPaths specification. For details, see
Select other optional properties as desired.
A receive activity is actually two activities: a Receive followed by an Assign in a Scope. These two activities are not atomic and if you, for example, initialize onAlarm in an event handler, you cannot use the variable until the assign has completed.
One receive can start a process
In a pick (event-driven gateway) with onMessage activities, one of many can start a process; the rest are ignored
Any one starts a process; all are required to complete the fork join (flow )
<receive partnerLink="NCName" portType="QName"?
<correlation set="NCName" initiate="yes|join|no"?>+
<fromPart part="NCName" toVariable="BPELVariableName"/>+