Tutorial Overview
The business process in this scenario is started as a result of receiving a Request for Quote from clients. The business process checks the enterprise's inventory and pricing systems to determine whether the order can be filled. Based on the shipping address provided by the client, the process also determines whether sales tax should be added to the quote. Finally the business process compiles a single quote document from the sales tax, price, and availability data, logs the quote by writing it to your file system, and sends it to the client.
Designing the Request for Quote Business Process
The following sequence summarizes the steps in the request for quote process and describes how the business process is designed:
- Receive a Request for Quote from a client.
You design a Client Request node in your business process to handle the receipt of an XML document that contains the customer name, shipping address, and the identity and quantity of the items for which the quote is requested. You design the business process so that it starts when it receives a Request for Quote message from a client.
- Evaluate a condition to determine whether sales tax should be included in the quote.
In this case, you design a Decision node to create different paths of execution based on the evaluation of a condition. The Decision node includes, on one path, a call to a Web service that calculates sales tax. Business Processes communicate with other services via controls. You design a Control Send node to communicate with a Web service that calculates the sales tax for your quote.
- Process the items sent in the Request for Quote message.
The business process must calculate the price and determine the availability of the items and quantities requested in the incoming XML message. This involves the creation of the following nodes in your business process:
- For Each: For Each nodes represent points in a business process at which a set of activities is performed repeatedly, once for each item in a list. For Each nodes include an iterator node (on which a list of items is specified) and a loop (in which the activities to be performed for each item in the list are defined)
- Parallel: Parallel nodes represent points in a business process at which a number of activities are executed in parallel. In this case, you design a Parallel node containing two branches: one to execute the events that calculate the price for the quote, the second to execute the events that determine the availability of items for the quote.
- Control nodes: Control Send and Control Receive nodes on each path handle the asynchronous exchange of messages between a business process and Web service resources (via controls). A pricing Web service returns the price for the items in the Request Quote document. An availability Web service returns information about the availability of the requested items.
- Compile price, availability, and tax information calculated by the business process into a quote document.
Your business process calculates a price quote, availability information, and sales tax rate. You design your business process to use Transformation controls that map the various pieces of data to an XML document that is returned to the client as the quote.
- Keep a record of the quote created by the business process.
Your business process uses a File control to write the quote to your file system.
- Send a response, containing the quote, to the client.
You design a Client Response node to send a response to the client. The response contains the data calculated by the business process.
Actors in the Tutorial Scenario
The actors in the tutorial scenario are represented in the following figure and described in the text that follows the figure:
The actors in the scenario include:
- The client of your RequestQuote service. Clients of RequestQuote are systems that create and send Request for Quote messages. A Request for Quote message provides the business process with a customer name, shipping address, and a list of items and quantity of those items required by the client. The business process computes and returns a price and availability quote for the items requested.
- Your RequestQuote business process. The process receives a Request for Quote for specific items and returns a price and availability quote for the items requested.
- A tax calculation Web service designed to calculate the sales tax to include in the quote, based on the shipping address provided by a client.
- A tax calculation business process designed to calculate the sales tax. The tax calculation business process serves the same purpose as the tax calculation Web service described in the preceding item. The RequestQuote business process can call either the Web service or the business process to request calculation of the sales tax for the quote.
- A pricing Web service designed to calculate the price of the items requested by a client.
- An availability Web service designed to determine the availability of the quantity of items requested by a client.
- Transformation controls: The business process in this case is started when it receives an XML document from a client. Data is shared and exchanged between resources in your application (clients, your business process, Web services and so on) in XML format. Transformation controls are designed to support the mapping of disparate data formats used in your application.
- A business process that validates the Request for Quote from clients (ValidateQuote.jpd). The RequestQuote business process communicates with this ValidateQuote process via Message Broker channels. In this way, the interaction between the business processes can be loosely coupled and anonymous.
- Message Broker channels: ValidateOrder and StopQuote. The RequestQuote business process communicates via these channels with the ValidateQuote process. In this tutorial, you design a single ValidateQuote service, but other services can be added and configured such that communication with the RequestQuote business process takes place by way of the ValidateOrder and StopQuote Message Broker channels.
|
|