BEA Logo BEA WebLogic Collaborate Release 1.0.1

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

 

   WebLogic Collaborate Doc Home   |   Tutorial   |   Previous Topic   |   Next Topic   |   Contents   |   Index

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 Sample Workflows

To execute the sample workflows:

  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

  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 ShipBill 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 and Billing tasks to the user joe. Therefore, joe's task list is updated with these tasks 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

  12. In the worklist, double-click the Shipping task to execute it. This removes the Shipping task from the worklist, since the only action in the Executed tab of the Shipping Task Properties dialog box is Mark Task as Done.

  13. In the worklist, double-click the Billing task to execute it. The Billing task attempts to call the POBean, but since it purposefully (for this demonstration) contains an invalid parameter (state abbreviation KK), the exception handler is invoked.

    Note that the CustomerState variable contains an invalid value: KK.

    Figure 5-12 Invalid Workflow Variable Value

    When WebLogic Process Integrator invokes the exception handler, the Send XML to Client action is executed and you are prompted to enter a valid United States state abbreviation.

    Figure 5-13 User Entry Dialog Box

  14. Enter a valid state abbreviation and click OK to continue the workflow.

    The Billing task is now executed and marked as done. 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. The ShipBill workflow proceeds, and the next task, Send Confirmation Back, is activated.

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

    Figure 5-14 Worklist Application: Role1 Assignment

  16. 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-15 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-16 Workflow Instances Dialog Box