Run the sample

You can run the sample using:

BPC Explorer

Follow these steps to run this sample using the Business Process Choreographer Explorer.

Starting the 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 the 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:

Start the to-do task with a business process

To start the request process, follow these steps:

  1. In the Process Templates section, click Currently Valid.
  2. The Currently Valid Process Templates view is displayed:

  3. Select the checkbox next to RequestProcess, then click Start Instance.
  4. The Process Input Message view opens:

  5. Optionally, enter a Process Name.
  6. In the question field, enter a value of type string.
  7. Click Submit.

Work with the human task

To work with human tasks, follow these steps:

  1. In the Task Instances section, click My To-dos.
  2. The My To-dos view opens:

    The task you created is in the Ready state. RequestTask is the Task display name, specified when you modeled the Task.

  3. Select the checkbox next to RequestTask and click Work on. The Task Message view is displayed.
  4. In the answer field, enter a value of type string.
  5. Click Complete.

To view the status of completed human tasks in BPC Explorer, follow these steps:

  1. In the Task Instances section, click All Tasks.
  2. The All Tasks view is displayed:

    As you can see, your task is now in the finished state.

  3. Click on RequestTask to view more details.
  4. Click on the Task Input Message tab to view the input message.
  5. Click on the Task Output Message tab to view the output message.

Process output

Output message

Since the request process is a long-running business process, the process output message is not displayed immediately after the process input message has been submitted. To display the process output message, follow these steps:

  1. Switch to the BPC Explorer.
  2. In the Process Instances section, click Started By Me.
  3. The Process Instances Started By Me view is displayed:

    As you can see, your process is now in the finished state.

  4. Click on process1 to view more details.
  5. The Process Instance view is displayed:

  6. Click the Process Output Message tab.
  7. The process output message is displayed:

Clean up process instances

Instances of the request process are not cleaned up automatically after completion. To delete process instances, follow these steps:

  1. In the Process Instances section, click Administered By Me.
  2. The Process Instances Administered By Me view is displayed:

  3. Select the checkbox next to process1 and click Delete.
  4. The list will automatically refresh and should now be empty.

Clean up task instances

Instances of the human task are not cleaned up automatically after completion. To delete task instances, follow these steps:

  1. In the Task Instances section, click Administered By Me.
  2. The Task Instances Administered By Me view is displayed:

  3. Select the checkbox next to RequestTask and click Delete.
  4. The list will automatically refresh and should now be empty.

Client application

Follow these steps to run this sample using the Client Application delivered with the sample.

Starting the client application

In the Download section of this sample, you can find the client application ToDoTaskClient as both a WID project interchange file and as an Enterprise Archive (EAR File). You can deploy either version to your server:

  • To deploy the project interchange file, import it into WID, right-click WebSphere Process Server v7.0, then select Add and Remove Projects and add the ToDoTaskClientEAR to the server.
  • To deploy the EAR file, open the administrative console and use Applications > Install New Application, accepting all the defaults. Then make sure that this application is started.

To run the client application in your Web browser, follow these steps:

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

  3. If security is enabled, you will be requested to log into the client Web application. Enter the userid and password.
  4. The home view of the client application is displayed:

Start a to-do task

To create a new to-do task, follow these steps:

  1. In the home page, click Create. The create page is loaded.
  2. Optionally, enter a Task identifier.
  3. In the Input data field, enter a value of type string.
  4. Click Create.
  5. A confirmation message is displayed:

  6. To return to the home view, click Home.
  7. To create another to-do task, click New.
  8. To display the task list view, click List.
  9. Click List to see the task you just created:

Track the task status with your client application

To track the status of your human task, follow these steps:

  1. Switch to the client application.
  2. In the home view, click View.
  3. The task list view is displayed:

    Notice the task is now in the finished state and the output message is available.

  4. To return to the home view, click Home.
  5. To create another to-do task, click New.
  6. To delete all tasks, click Delete all.
  7. To delete all tasks that are in the finished state, click Delete finished.
  8. To refresh the task list view, click Refresh table.

To track the status of human tasks in general, follow these steps:

  1. Switch to the client application.
  2. Create a new task and submit.
  3. In BPC Explorer, claim the task. Before you complete the task, return to the client.
  4. In the home view, click View.
  5. You should now see the task status as claimed.
  6. Return to BPC Explorer and complete the task.
  7. Return to the client and Refresh table. The task status is now finished.

Client application

To delete task instances with the client application, follow these steps:

  1. Switch to the client application.
  2. In the home view, click View.
  3. The task list view is displayed:

  4. To delete all tasks that are in the finished state, click Delete finished.
  5. To delete all tasks, click Delete all.
  6. A confirmation message is displayed:

  7. To return to the task list view, click OK.