ActiveVOS Designer User’s Guide

Receive

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 Participants for descriptions of concepts important to this activity.

The receive activity can begin a business process instance by including a Create Instance 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 Pick and Event Handling.

Required and optional properties for a receive activity

Required Properties

Optional Properties

Participant (Partner Link)

Name. See Selecting Activity Labels

Operation

Port Type

Variable (required only for executable process, not abstract process)

or

FromPart to Variable. See From Part to Variable.

Correlations. See Correlation

Create Instance. Required if this is the start activity.

Join Condition. See Creating a Join Condition for an Incoming Link

Suppress Join Failure. See Process Properties

Documentation. See Adding Documentation to a Process

Comment. See Adding Comments to a Process

Setting Visual Properties and Using Your Own Library of Images

Execution State. See Viewing the Execution State of an Activity or Link

Message Exchange. See Message Exchange Declaration

Extension Attributes and Extension Elements. See Declaring Extension Elements and Attributes.

To add a receive activity to the process manually:

Note: For a shortcut and recommended technique, see Creating an Activity by Starting with a WSDL Interface.

  1. From the Activity palette, drag a receive activity to the Process Editor canvas.
  2. In the Properties view, select the following values:
    1. Optionally type in a Name.
    2. In the Participant drop-down, select New Process Service Consumer. See Creating a New Process Service Consumer Interface.
    3. Select an Operation from the drop-down list.
  3. In the Data tab, do one of the following:
  4. Select other optional properties as desired.

Usage Examples

One receive can start a process

One receive can start a process

Any one starts a process; all are required to complete the flow

Multiple receives inside a flow

In a pick with onMessage activities, one of many can start a process; the rest are ignored

Any OnMessage in a Pick can start a process

XML Syntax

<receive partnerLink=”NCName” portType=”QName”?
      operation=”NCName”
    variable=”BPELVariableName”? createInstance=”yes|no”?
    messageExchange=”NCName”?
    standard-attributes>
  standard-elements
  <correlations>?
    <correlation set=”NCName” initiate=”yes|join|no”?>+
  </correlations>
  <fromParts>?
   <fromPart part=”NCName” toVariable=”BPELVariableName”/>+
  </fromParts>
</receive>

XML Example

<receive name="ReceiveCustomerRequest" partnerLink="customer" portType="lns:loanServicePT" operation="request" variable="request" createInstance="yes"/>