WebLogic Integration's business process management (BPM) functionality enables the integration of diverse applications and human participants, as well as the coordinated exchange of information between trading partners outside of the enterprise.
This tutorial provides a tour of the features available to design business processes in the BEA Workshop graphical design environment. It describes how to create a business process that orchestrates the processing of a Request for Quote.
Tutorial Goals
The goal of the tutorial is to provide the steps to create and test a business process using the graphical environment provided in BEA Workshop. It includes:
Designing communication nodes in a business process—that is, creating the interface between your business process and its clients and resources. Clients of business processes can be any other resources or services that invoke business processes to perform one or more operations.
Designing the interactions with clients, including creating the methods that expose your business process's functionality.
Designing the interactions with resources using controls. WebLogic Platform controls make it easy to access enterprise resources, such as databases, Enterprise Java Beans (EJBs), Web services, and other business processes (including those that use RosettaNet and ebXML business processes) from within your application.
Handling XML, non-XML, and Java data types in the business process—includes working with XML schemas and transforming data between disparate data types using the Transformation tool.
Designing business processes to publish and subscribe to message broker channels.
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 Figure 1-1, and described in the text that follows the figure:
Figure 1-1 Tutorial Scenario
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.
Steps in This Tutorial
This tutorial creates a business process that meets the following requirements: receives Request for Quote messages from clients, starts the business process on receipt of the Request for Quote, validates and processes the request, and sends the status of the Request for Quote to the client.
The tutorial is organized into parts:
Part I
In Part I, you learn how to create a new business process, specify how the process is started at run time, and design a Decision node that includes asynchronous calls to a Web Service. Lastly, you can run and test the business process you created. To get started, proceed to Build and Run a Simple Business Process.
Part II
In Part II, you learn how to replace the asynchronous call to the Web service you designed in Part I with an asynchronous call to another business process. You learn how to create a process control and how the control's framework makes it easy to change the interactions your business process makes with various resources. To learn about the specific steps to complete this part, see Call a Business Process Using a Process Control.
Part III
In Part III, you add more complex business logic to the business process you created in the preceding parts. You learn how to create looping logic, design parallel processing nodes, transform the price and availability data from untyped XML data to typed XML, use a File control to write your quote to a file system, and use a Client Response node to return the quote to the client invoking the business process. At the end of this part, you can run and test the business process you built. To learn about the specific steps to complete this part, see Adding Looping Logic, Parallel Paths . . .
Part IV
In Part IV, you add a message broker, to the business process and run and test the business process. To learn more see Using the Message Broker.