receive has been edited by Maciej Szefler (Apr 23, 2007).

(View changes)

Content:

Name

<receive> – receive a message from a partner

Synopsis

<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>

throws bpel:ambiguousReceive, bpel:conflictingReceive, bpel:conflictingRequest, bpel:correlationViolation, bpel:invalidVariables, bpel:uninitializedPartnerRole,
bpel:uninitializedVariable

Description

The <receive> activity enables a BPEL process to implement a Web Service operation. When this activity is encountered, ODE will begin searching for messages that match the activity. The activity will not complete until a match is found or the scope is terminated.
In this sense, the activity can be said to block. For non-deterministic selection (something akin to a POSIX select), the <pick> activity should be used.

The precise timing of message arrival is not important. The message can arrive before the <receive> activity is activated; ODE will store the message in an internal queue and associate it with the appropriate <receive> once it is activated.

If the operation is of a request-response style, the <reply> activity can be used to send the reply.

  • partnerLink – the partnerLink whose myRole should be used.
  • portType – (optional) the portType of the implemented operation.
  • operation – name of the implemented operation.
  • variable – (optional) variable into which the received message content should be stored
  • createInstance – (optional) flag indicating whether this activity is used to instantiate the process instance
    • yes – if this is an activity that can be used to create a new process instance
    • no – if this activity does not create a new process instance
  • messageExchange – (optional) a string identifer used to disambiguate message exchanges on the same partnerLink/operation.
  • <correlations> / <correlation> – specifies the correlation sets that are used in this exchange
    • set – name of the correlation set
    • initiate – specifies whether this operation will initiate the correlation set.
      • yes – the operation will initialize the correlation set based on the data received in the message
      • no – the operation will not initialize the correlation set — correlation set will already be initialized and the operation will ensure that the message returned matches the correlation set
      • join – the operation will not initialize the correlation set if it is not already initialized. Otherwise, the operation will ensure that the message returned matches the correlation set.
  • {{ <fromParts> / <fromPart> }} – map received message parts into variables. When these elements are present, the variable attribute must not be used
    • part – name of the received message part
    • toVariable – the variable in which the part should be saved

      ODE does not yet support the <fromPart> syntax. Hence, the variable attribute must be used.

Faults

Examples

See Also

<pick> – provides non-deterministic version of <receive>.

<reply> – allows the process to reply to a <receive>'d message.

Reply via email to