ActiveVOS Designer User’s Guide

Receive

When a BPEL processing engine gets a message, it searches for a receive activity with a matching partner link and operation. The receive activity specifies the partner link it expects to receive a message from and the operation it expects the partner’s service to invoke. For an executable process, the receive must specify an input variable or variable part for the message data received. See Partner Link Types and Partner Links 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 by including 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 structure. For more information, see Flow. Also you must provide a correlation set name 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 an onEvent event handler. For more information, refer to Pick.

Required and optional properties for a receive activity

Required Properties

Optional Properties

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 in order:
    1. Partner Link
    2. Port Type (Optional. Valid port types appear in the drop-down list after you select a partner link.)
    3. Operation. Valid operations appear in the drop-down list after you select a partner link.
  3. Optionally type in a Name.
  4. Optionally, select a Variable from the operation.
  5. Optionally, if you do not select a variable, create a From Part specification. For details, see From Part to Variable.
  6. 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"/>