Run the sample

Before you run this sample, make sure that security is enabled for WebSphere® Process Server and that the users and groups are created as required, for example, by using the script ADDUSERS2.BAT as described in the in the Introduction section.

To run this sample, use the Business Process Choreographer Explorer.

Business Process Choreographer Explorer (BPC Explorer)

To start BPC Explorer in the integrated test environment of your WebSphere® Integration Developer, follow these steps:

  1. In WebSphere Integration Developer, switch to the Servers view.
  2. In the table, right-click WebSphere Process Server v7.0.
  3. From the pop-up menu, select Launch > Business Process Choreographer Explorer.

To start BPC Explorer on WebSphere Process Server, follow these steps:

  1. In a web browser, open URL http://yourhost:yourport/bpc.
  2. Note: Replace yourhost with your server's internet address and replace yourport with the port of your server's HTTP transport, for example

If security is enabled, the BPC Explorer opens with a login screen:

  1. Enter a valid User ID and Password. The default User ID is admin.
  2. Click Login.

The BPC Explorer opens:

Starting the sample business process

To start the helpdesk process, perform the following steps:

  1. Switch to the BPC Explorer.
  2. Log in with user ID hdA, be sure to enter the user ID in mixed case exactly as shown.
  3. In the Process Templates Section, click the Currently Valid link.
  4. The Currently Valid Process Templates view is displayed:

  5. Check the checkbox next to HelpDeskProcess, then click Start Instance.
  6. The Process Input Message view opens:

  7. Optionally, enter a Process Name.
  8. In the serialNo field, enter a string.
  9. In the problemDescription field, enter a string.
  10. Click Submit.

Working with the human task

To work with the HelpDeskRequest task, perform the following steps:

  1. Switch to the BPC Explorer.
  2. Make sure you are logged in with user ID hdA (case sensitive).
  3. In the Task Instances section, click My To-dos.
  4. The My To-dos view opens:

    The HelpDeskRequest task is in the state Ready.

  5. Wait at least 2 minutes. This will create an escalation item for the hdteamlead userid.
  6. Optionally, wait two more minutes. This will create another escalation item for the hdmanager userid.
  7. Select HelpDeskRequest, then click Work on. This changes the state of the human task from Ready to Claimed and starts the timer for additional escalations.
  8. Instead of completing the work, click Logout.

Displaying escalations

In the previous steps, user hdA has caused the creation of several escalation items by missing the time thresholds specified in the process template. To display the escalation items, perform the following steps:

  1. Switch to the BPC Explorer.
  2. Login with user ID hdteamlead (case sensitive).
  3. In the Task Instances section, click My Escalations.
  4. The My Escalations list is displayed for the particular user ID:

  5. To display the escalation details, click the name of the escalation in the list.
  6. To display the task details, click the task name in the list.

You may repeat these steps for the userids qualitymanager and hdmanager to inspect the other escalation items that were created.

Cleaning up the escalations

The process template definition used in this sample has enabled the flag "Automatically delete the process after completion". Thus, to delete the process it is sufficient to complete the HelpDeskRequest task. The deletion of the task will as well trigger the deletion of all dependent escalation items. To complete the task, perform the following steps:

  1. Switch to the BPC Explorer.
  2. Log in with user ID hdA. The My Tasks view opens again.
  3. Select HelpDeskRequest, which is in state Claimed, then click Work on.
  4. The Task Message view is displayed:

  5. In the answer field, enter a string.
  6. Click Complete.
  7. The My Tasks view is displayed. The task has been removed from the list. In addition, all escalations and the process instance have been deleted.

Notification event handler output

Inspect the SystemOut.log of your WebSphere Process Server. The notification event handler writes output similar to the following lines to the SystemOut.log:

[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O --- Notification event received: May 15, 2009 3:56:10 PM
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Task template name: HelpDeskRequest
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Task name: HelpDeskRequest
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Event handler name: Escalations
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Is escalated: true
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Notification event received.
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Escalation name: NotFinishedAfterFourMinutesEvent
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Duration until escalated: 4minutes
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O Duration until repeated: 2minutes
[5/15/09 15:56:10:078 CEST] 00000054 SystemOut O --- End notification event

If you run the integrated WebSphere Test Environment, you can see this information in the Server Logs view: