BEA Logo BEA WebLogic Process Integrator Release 1.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Process Integrator Doc Home   |   Tutorial   |   Previous Topic   |   Next Topic   |   Contents   |  

Executing the Workflow Example

 

The execution starting point for the workflow example is the Start Order Processing workflow. You start this workflow manually through the WebLogic Process Integrator Worklist application.

The following sections describe how to execute the workflow example:

 


Logging On to the Worklist Application

To start the worklist application:

  1. From your desktop, choose Start > Programs > WebLogic Process Integrator > Worklist to display the Logon dialog box.

    Figure 5-1 Logon to WebLogic Process Integrator Dialog Box

  2. Enter your user ID, password, and the name of the WebLogic Process Integrator server to which you will connect.

 


Executing the Workflow

To execute the workflow example:

  1. From the Workflow menu, choose Start Workflow to display the Start Workflow dialog box.

    Figure 5-2 Start Workflow Dialog Box

  2. Select the Start Order Processing workflow and click OK. The workflow is instantiated and a confirmation message is displayed.

    Figure 5-3 Workflow Successfully Started

  3. Click OK.

    The first and only task of the Start Order Processing workflow is assigned to the user joe and is displayed on the worklist.

    Figure 5-4 Worklist Application: Task List

  4. Double-click the Start Order Processing task to execute the actions defined earlier under the Executed event of the Start Order Processing task; in this case, the creation of an XML document that triggers the Order Processing workflow.

    The first task of the Order Processing workflow is Confirm Order, which is assigned to the user: joe. This task is displayed on Joe's worklist, once the workflow is triggered.

    Figure 5-5 Worklist Application: Triggered Workflow

  5. To verify that the Order Processing workflow has been triggered, you open the instances window of that workflow. In the WebLogic Process Integrator Studio, right-click the workflow template definition for the Order Processing workflow and choose Instances from the pop-up menu. The following dialog box is displayed.

    Figure 5-6 Workflow Status Dialog Box

    The diagram shows the instance that has been started.

  6. Right-click anywhere in the instance diagram to display a menu with the following options:

  7. Choose Workflow Status to find out which node is the current active one.

    The Confirm Order task will be highlighted, showing that it is active and not yet executed.

  8. Choose the Variables option to display the list of Order Processing workflow variables and their current values.

    Note that all variables defined in the Start node are populated by the values coming from the XML document. The variable Confirm is still empty because the user has not confirmed the order yet.

    Figure 5-7 Workflow Variables Dialog Box

  9. Return to the worklist and double-click the Confirm Order task.

    This executes the Send XML to Client action defined under the Executed tab of the Confirm Order Task Properties dialog box. The action displays the Confirmation message box to the user joe.

    Figure 5-8 Confirmation Message

  10. Click Yes to make the flow proceed and call the Inventory bean. Check the status of the Order Processing workflow again in the instances dialog box and particularly the values of the variables.

    The dialog box shows that both Confirm and Inventory now have values.

    Figure 5-9 Workflow Variables Dialog Box

    Because the value of the variable Inventory is not zero, the Ship/Bill workflow is called as the result of the execution of the Start Workflow action in the true case of the decision. This workflow assigns the Shipping task to the user joe. Therefore, joe's task list is updated with that task as follows:

    Figure 5-10 Worklist Application: Joe's Task List

  11. In the Studio application, right-click the ShipBill workflow template definition in the folder tree and choose Instances from the pop-up menu to display the started instance of the ShipBill workflow.

    Figure 5-11 Workflow Status: ShipBill Workflow

    Note that the task Shipping is highlighted, because it is still active and has not been executed or marked done. However, the Billing task is marked as done because all actions related to it were defined within the Activated event. In other words, when the Billing task was executed, all actions (including Mark Task as Done) assigned in the Activated tab of the Billing task were executed.

    Also note that the flow is waiting for the task Shipping to be executed in order to satisfy the AND join and move on.

    All variables that have been transferred from the parent Order Processing workflow are populated. The variable TotalPrice is calculated as the result of the call of the Billing POBean.

    Figure 5-12 Workflow Variables Dialog Box

  12. On the worklist, double-click the Shipping task to execute it. The ShipBill workflow proceeds, and the next task, Send Confirmation Back, is activated.

  13. Send Confirmation Back is assigned to Role1. Select the Role1 tab on joe's worklist to see the task.

    Figure 5-13 Worklist Application: Role1 Assignment

  14. Double-click the Send Confirmation Back task to execute it and send an XML message back to the Order Processing workflow that completes the process.

    The Order Processing and ShipBill workflow instances are marked as complete as reflected in the monitoring dialog boxes. The completed date and time are displayed.

    Figure 5-14 Workflow Instances Dialog Boxes: Completed Date and Time

    The preceding procedure is one scenario for this process. Another scenario that can be tested is to answer No to the confirmation and cause the order to cancel. In this case, the monitoring dialog box shows the instance of the Order Processing workflow with the comment Workflow Cancelled as defined in the Set Workflow Comment action.

    Figure 5-15 Workflow Instances Dialog Box