Receive
See Also
A business process provides services to its partners through associated Receive and Reply activities. The Receive activity causes the process to wait for a matching message to arrive from a partner service. The process
cannot continue or end until it receives a matching message from the partner service. Thus, the attributes of the Receive activity are the Partner Link, the port type (optional), and the operation that the partner is expected to invoke.
The Receive activity is also used to start a business process instance. For this initial Receive element, the createInstance attribute must be set to yes. If there are other Receive activities in your process, their createInstance attributes should be set to no.
To use the Receive element:
- In the Design view, drag the Receive element from the Palette to the diagram.
- Right-click the Receive element on the diagram and choose Edit.
- In the Property Editor dialog box, configure the following:
- Name. Enter an arbitrary name.
- Partner Link. Select the Partner Link that should send an inbound message. Another way to associate a Partner Link with the Receive activity is to draw a message flow on the diagram.
- Operation. Define the operation to be associated with the Receive element. The operation is already defined in the partner WSDL file, so you can select it from the drop-down list.
- Input Variable. Create a new variable or use an existing variable to hold the received message and transport it for consequent operations.
- Create Instance (Optional). Select this checkbox to set the Create Instance attribute to yes if this Receive element starts the business process.
The Receive element is now configured to wait for a message from a partner web service.
Adding Correlation Sets
You can add the correlation sets defined for the Scope and Process elements to a Receive element. Before adding a correlation set to Receive, make sure that at least one correlation set has been defined for the parent Scope or the entire Process.
To add a correlation set to Receive:
- In the Design view, right-click the Receive element and choose Edit.
- In the Property Editor, select the Correlations tab and
click Add.
- In the Choose a Correlation Set dialog box, expand the
Correlation Sets node, select the correlation set and click OK.
- Choose the initiate attribute for this correlation set from the Initiate drop-down list. You can select one of the following options:
- Yes. The activity must attempt to initiate the correlation set.
- Join. The activity must attempt to initiate the correlation set if the correlation set is not yet initiated.
- No. The activity must not attempt to initiate the correlation set. This is the default option.
- (Optional) Add more correlation sets as needed and click
OK.
- See Also
- Partner Link
- Reply
- Understanding Correlation
- Creating Variables
- BPEL Designer Palette: Web Service
- New Variable Dialog Box
- About the Design View of the BPEL Designer
Legal Notices