Overview of the Example
The following sections provide an overview of the WebLogic Process Integrator workflow example:
Description
The example presented in this document involves the following workflows:
- Order Processing Workflow
- Start Order Processing Workflow
- ShipBill Workflow
The example workflows interact by way of XML messaging and are supplied with the product on the WebLogic Process Integrator software CD and can be imported into your database. This document describes in detail how to define these workflows and in doing so describes the main functions of WebLogic Process Integrator.
About the Example
The example derives the flow from the confirmation of the order through shipping the item to and billing the customer. The front end handling the order is abstracted for the purpose of this exercise into an XML document, which provides the ordering information to the Order Processing workflow. (In a live situation, the XML document would be generated by a front-end customer application.)
The order process is split into two workflows: Order Processing, which processes the order, and ShipBill, which handles the shipping and billing of the order. The third workflow, Start Order Processing, is a workflow that has been created for this example. Its function is simply to start the order process. For the purposes of this example, the Start Order Processing workflow takes the place of the customer application.
It is important to note that this example could have been implemented as one workflow interaction with explicit calls to application functions through the use of several actions and without necessarily using XML.
Example Workflows
The three workflows are as follows:
- Start Order Processing-This workflow contains a simple task, which creates the XML document, which in turn triggers the Order Processing workflow. In a "real" environment, this information could be captured by a front-end application and the information sent to the Process Integrator process engine through an XML document. In such a situation, a workflow would not simulate an application that sends an XML document representing the Order.
- Order Processing-This workflow takes the order and processes it through a first confirmation, inventory checking, and the completion of the order.
- ShipBill-This workflow handles the shipping and billing of the ordered item, and it is called by the Order Processing workflow. It therefore can be considered a sub-workflow to Order Processing.
The following diagram illustrates the interaction between the workflows defined in this tutorial.
Figure 1-1 Workflow Interaction
Important Terms
Before you get started with this tutorial, it is important to understand the following key terms:
- A workflow is a business process. Workflow automation is the automation of a business process, in whole or in part, during which information of any type is passed to the right participant at the right time according to a set of intelligent business rules that allow computers to perform most of the work while humans only have to deal with exceptions.
- A workflow template is a folder (or a container) in WebLogic Process Integrator Studio. This workflow template represents a workflow and is given a meaningful workflow name, such as Order Processing or Billing. The workflow template aggregates various definitions (or "versions") of its implementation; these are referred to as workflow template definitions. Further, a workflow template is responsible for controlling which organizations can use the "contained" workflow template definitions.
- A workflow template definition is a definition (or "version") of the workflow, distinguished by its Effective and Expiry dates. At run time, WebLogic Process Integrator starts an instance (or session) of a workflow template definition, selecting the most effective (or current and active) definition.
Main Steps
The main steps for defining and running the workflow example are as follows. These steps are described later in this document and in other documents.
- Create the following user, role, and organization within WebLogic Server by
adding them to the "WLPI Specific Section" of the weblogic.properties
file:
- User: joe
- Role: Role1
- Organization: ORG1
The default weblogic.properties file, provided on the WebLogic Process Integrator product CD, contains default WebLogic Process Integrator users, roles, and organizations. Simply copy an existing "WLPI" user, role, and organization and paste it in the appropriate section (# WLPI users, # WLPI roles, or # WLPI orgs), modifying the name to match those listed above. You can enter any password for the user.
Locate the weblogic.properties file in the following directory:
Drive:/wlprocessintegrator/server/
or for UNIX:
\root\wlprocessintegrator\server\
- Activate the user, role, and organization that you added to the
weblogic.properties file in WebLogic Process Integrator Studio
following the instructions provided in the Chapter 2, "Administering Data within
WebLogic Process Integrator," in the BEA WebLogic Process Integrator Studio
Guide.
- Deploy the JavaBean POBean, which is used in the Order Processing workflow
to check the inventory for the item ordered and return the results to the workflow.
The file POBean.jar is provided on the product CD in the following directory:
Drive:/wlprocessintegrator/studio/examples
or for UNIX:
\root\studio\examples
The weblogic.properties file has the setup required to deploy this bean.
- Import the workflow template definitions for Start Order Processing and ShipBill
using the procedure described in Importing the Start Order Processing Workflow
Template Definition in Defining the Start Order Processing Workflow. The
example discussed in this document involves three workflow template
definitions, all of which are available in the following directory of the WebLogic
Process Integrator CD:
Drive:/wlprocessintegrator/studio/examples
or for UNIX:
\root\studio\examples
You will follow the instructions provided in this guide to create and define the Order Processing workflow, so you do not need to import this workflow template definition. However, if you want to import all three example workflows and read this document with the workflows already set up and available in your database, you must import the workflows in the following order:
- Start Order Processing
- ShipBill
- Order Processing
Note: Importing the workflows in this sequence is only mandatory if you are importing all three workflows, rather than the suggested two workflows (Start Order Processing and ShipBill).
- Define the workflows. (See Defining the Order Processing Workflow, Defining
the Start Order Processing Workflow, and Defining the ShipBill Workflow.)
You must redefine a few actions in the Order Processing and ShipBill workflows to resolve some external references. A warning message is displayed that the workflow contains some unresolved references. They are as follows:
- In Order Processing: In the decision:Inventory<>0, redefine the action Start Workflow in the True path of the decision.
- In the task Inventory Check, in the Activated tab of the Task Properties dialog box, redefine the action Perform Business Operation and choose the Check Inventory business operation.
- In ShipBill: In the task: Billing, in the Activated tab of the Task Properties dialog box, redefine the action Perform Business Operation and choose Calculate Total Price.
- Execute the workflow. (See Executing the Workflow Example.)
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
|