Step 11: Send Quote From Business Process to Client

A business process must be able to send and receive messages to and from its clients. You designed your business process to receive messages from a client in Step 2: Specify How the Process is Started. This section describes how to add operations that send messages from your business process to a client. That is, in this section you learn how to design Client Response nodes.

This step describes the following tasks:

To Add a Client Response Node to Your Business Process

  1. On the Application pane, double-click RequestQuote.jpd to ensure that your business process is displayed in Design View.
  2. In Design View, select image Client Response in the Palette, then drag and drop the node onto the business process immediately before the Finish node. The Design View is updated to contain the Client Response node.
  3. Change the name of the node from Client Response to Send Quote.
  4. image

To Design Your Send Quote Node

This section describes how to complete the design of the interaction with clients for this business process. Specifically, at this point in the process, the business process sends a quote containing price and availability information to clients.

In this step, you specify the structure of documents that your business process sends to clients from this node.

  1. Double-click the Send Quote node in your business process. The node builder is displayed.
  2. In the General Settings tab, change the name in the Method Name field from clientResponse to quoteResponse.
  3. Click Add to display the panel of data types.
  4. Note: In the Combine Price and Avail Quotes node, you created an XML variable to hold the quote. This data assigned to this variable is valid against the Quote.xsd Schema. Therefore we are concerned with XML Types at this node.

  5. If it is not already selected, select XML.
    1. If necessary, click the + beside XML Types to see a list of XML Schemas in your project.
    2. Expand Quote.xsd, then click the quote node. The Type field is populated with org.example.quote.QuoteDocument.
    3. In the Name field, replace x0 with responseXML. In this way, you name the parameter that returns the QuoteDocument.
  6. Click OK. The QuoteDocument responseXML parameter is added to the General Settings tab in the node builder and the General Settings tab is marked complete:image
  7. Click the Send Data tab. A tab that allows you to define one or more variables to hold the data your business process sends to clients is displayed.
  8. The Client Expects field is populated with the data type and the name of the parameter you specified on the General Settings tab: QuoteDocument responseXML

  9. Under Select variables to assign, select the Quote (quote) variable.
  10. image

  11. To close the Client Response node builder, click the X in the top right-hand corner of the node builder.
  12. From the Workshop menu, select File —> Save.
  13. This step completes the design of your RequestQuote business process. To run it, proceed to Step 12: Run the Request Quote Business Process.

Previous Document Next Document