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 ADDUSERS1.BAT as described in the in the Introduction section.

This sample is started by using the Business Choreographer Explorer and then continued by using the custom client shipped with this sample.

Business Process Choreographer Explorer (BPC Explorer)

If you already know how to start a BPC Explorer session, you may proceed to the section Start the credit request process.

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

The login screen is displayed:

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

Start the credit request process

To start the order process, follow these steps:

  1. Switch to the BPC Explorer.
  2. Log in with user ID sellerA.
  3. In the Process Templates section, click Currently Valid.
  4. The Currently Valid Process Templates view is displayed:

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

  7. Optionally, enter a Process Name that you can use later to identify the process instance.
  8. In the CreditRequestID field, enter a value of type string.
  9. In the CustomerName field, enter a value of type string.
  10. In the Credit field, enter an integer value.
  11. Click Submit.

Call the custom client

To start the custom client, follow these steps:

  1. Install the SubtaskClientEAR.ear file delivered with this sample.
  2. In a web browser, open URL http://yourhost:yourport/subtasksample.
  3. Note: Replace yourhost with your server's internet address and replace yourport with the port of your server's HTTP transport, for example

  4. If prompted, login as sellerA to authenticate yourself to the server:
    • If you did not authenticate to your WebSphere Process Server during your current browser session, a login dialog appears.
    • If you already did authenticate to your WebSphere Process Server, for example by opening the BPC Explorer, the login dialog will be skipped.
  5. The welcome page is displayed:

View template information

    To view information about the task templates used in this sample, click on the Template info link. The template information page is displayed:

    Click on Home to return to the welcome page.

Start a subtask

  1. Switch to the welcome page of the custom client.
  2. Click on the View link.
  3. The instances of the seller request task are displayed:

  4. In the creditRequestID field enter the value of the task for which you want to create a subtask. In this case it is ID123.
  5. In the Comment field enter a string which is presented to the receiver of the created subtask.
  6. Click the Create Sub Task button to create a subtask.
  7. The following message is displayed:

  8. Click the Home button to return to the welcome page.

Work with the subtask

  1. Switch to the BPC Explorer.
  2. Click Logout to log out the user sellerA.
  3. Log in with the user ID approverA.
  4. In the Task Instances section, click My To-dos.
  5. The My To-dos view is displayed. The newly created subtask is displayed.

  6. Select the task instance of the template approverRequest.
  7. Click on Work on.
  8. The Task Message view is displayed. Note that the comment you entered on the custom client is presented here again.

  9. In the Rating field, enter a string value.
  10. Click on Complete.
  11. Log out from the BPC explorer.

Check the results of the subtask

  1. Switch to the custom client.
  2. Log in with the user ID sellerA.
  3. Click View.
  4. The view page is displayed:

    The rating and the username of the approver who is responsible for this rating is displayed in the Rating column.

    Note: If the Rating column does not contain the approver and the rating, click Refresh table.

Verify that the waiting parent task cannot be finished

  1. Switch to the BPC Explorer.
  2. Log in with the user ID sellerA.
  3. Switch to the My To-dos view.
  4. Select the sellerRequest task.
  5. Click on Work on.
  6. The Task Message view is displayed:

  7. In the Acknowledgement field, enter a string value.
  8. Click on Complete.
  9. Since this task is waiting for a subtask which has not been completed yet, it is not allowed to complete this task. Therefore, an exception is displayed.

Work on the second subtask

  1. Switch to the BPC Explorer.
  2. Log in with the user ID supervisorA.
  3. In the Task Instances section, click My To-dos.
  4. The My To-dos view is displayed. There the newly created subtask is displayed.

  5. Select the task instance of the template supervisorInformation.
  6. Click on Work on. The Task Message view is displayed.
  7. In the Acknowledgement field, enter a string value.
  8. Click on Complete.
  9. Log out from the BPC explorer.

Check the results of the subtask

  1. Switch to the custom client.
  2. Log in with the user ID sellerA.
  3. Select the View page.
  4. Click on Refresh table.
  5. The view page is displayed:

    The approval and the username of the supervisor who is responsible for this approval is displayed in the rating column. Note that sellerA is allowed to read the output information of the supervisorInformation task although he is not defined as reader of the supervisorInformation task template.

Complete the credit request process

  1. Switch to the BPC Explorer.
  2. Log in with the user ID sellerA.
  3. Switch to the My To-dos view.
  4. Select the sellerRequest task.
  5. Click on Work on.
  6. The task message view is displayed:

  7. In the Acknowledgement field, enter a string value.
  8. Click on Complete.
  9. The credit request process is now completed.