This project has retired. For details please refer to its Attic page.
Apache ODE – receive



<receive> -- {excerpt}receive a message from a partner{excerpt}


<receive partnerLink="NCName"
      <correlation set="NCName" initiate="yes|join|no"? />+
      <fromPart part="NCName" toVariable="BPELVariableName" />+

throws [bpel:ambiguousReceive](#ambiguousreceive.html), [bpel:conflictingReceive](#conflictingReceive), [bpel:conflictingRequest](#conflictingRequest), [bpel:correlationViolation](#correlationViolation), [bpel:invalidVariables](#invalidVariables), [bpel:uninitializedPartnerRole](#uninitializedPartnerRole), [bpel:uninitializedVariable](#uninitializedvariable.html)


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](pick.html)> activity should be used.

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

If the operation is of a request-response style, the <[reply](reply.html)> 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.


{anchor:ambiguousReceive} - bpel:[ambiguousReceive](ambiguousreceive.html) --

{anchor:conflictingReceive} - bpel:[conflictingReceive](conflictingreceive.html) --

{anchor:conflictingRequest} - bpel:[conflictingRequest](conflictingrequest.html) --

{anchor:correlationViolation} - bpel:[correlationViolation](correlationviolation.html) --

{anchor:invalidVariables} - bpel:[invalidVariables](invalidvariables.html) --

{anchor:uninitializedPartnerRole} - bpel:[uninitializedPartnerRole](uninitializedpartnerrole.html) --

{anchor:uninitializedVariable} - bpel:[uninitializedVariable](uninitializedvariable.html) --


See Also

<[pick](pick.html)> -- provides non-deterministic version of <[receive]>.

<[reply](reply.html)> -- allows the process to reply to a <receive>'d message.