Designer > Implementing a BPMN Task or Event in BPEL > Reply
  

Reply

BPMN Implementation: Send task, Message throw event
A reply activity sends a message back to a Web service in response to a message received or through fault handling. The received message is in a receive activity, an onMessage handler, an onEvent handler, or an invoke. For a request-response operation, a reply activity has the same partner link and operation as its matching receive, onMessage, or onEvent.
A receive may have multiple reply activities referencing it but only one of them is allowed to execute. For example, there may be a normal reply and a fault-handling reply. Both replies share a partner link and operation with receive, but only one of them is allowed to execute.
For an executable process, a reply activity must specify a variable for the message data being sent.
A reply activity can return a fault response. You can select a reply to handle a fault by adding it to a catch container and specifying the fault name and variable properties. See Adding a Fault Handler for more information.
A reply activity can return a fault response. You can select a reply to handle a fault by adding it to a catch container and specifying the fault name and variable properties.
Required Properties
Optional Properties
Participant (Partner Link)
Name. See Selecting Activity Labels
Operation
Port Type
Variable
See Input Variable
or
toPart fromVariable
See From Variable to Part.
Correlation
 
Fault Name
 
Join Condition. See Creating a Join Condition for an Incoming Link
 
Suppress Join Failure. See Process Properties
 
Comment. See Adding Comments to a Process
 
Documentation. Adding Documentation 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 reply activity to the process manually:
For a shortcut and recommended technique, see Creating an Activity by Starting with a WSDL Interface.
  1. 1. Drag a Send task or Message throw event to the Process Editor canvas.
  2. You can add a background color to the send task, but not the message throw event.
  3. 2. In the Properties view, select the following values:
    1. a. Optionally type in a Name.
    2. b. In the Participant drop-down, select New Process Service Consumer. See Creating a New Process Service Consumer Interface.
    3. c. Select an Operation from the picklist.
  4. 3. In the Data tab, do one of the following:
  5. 4. Select other optional properties as desired.
A simple example of using a reply activity in a process is shown in the following illustration.
To add a reply activity with a fault response:
  1. 1. Create a catch container for the appropriate scope or the process as a whole. For more information, see Defining Catch and CatchAll Fault Handlers.
  2. 2. Create a catch container for the appropriate scope or the process as a whole.
  3. 3. Add a reply to the catch container.
  4. 4. Select the properties and name, as described in the procedure above.
  5. 5. Select a Fault Name from the list. The fault name is defined in a WSDL file.
  6. 6. Select the fault variable from the Variable list.
The following illustration shows an example of a reply with fault. The fault name is shown in the main tab. The variable is specified in the Data tab.
The following illustration shows a simple example of using a reply with a fault in a catch handler.
XML Syntax
<reply partnerLink="NCName" portType="QName"?
operation="NCName"
variable="BPELVariableName"? faultName="QName"?
messageExchange="NCName"?
standard-attributes>
standard-elements
<correlations>?
<correlation set="NCName" initiate="yes|join|no"?>+
</correlations>
<toParts>?
<toPart part="NCName" fromVariable="BPELVariableName"/>+
<toParts>
</reply>
Example 1 Normal Response:
<reply name="reply" partnerLink="customer"
portType="lns:loanServicePT" operation="request"
variable="approval">
Example 2 Fault Handling:
<reply name="reply" partnerLink="customer"
portType="lns:loanServicePT" operation="request"
variable="error" faultName="unableToHandleRequest">