Run the sample

Because the business process and the human task were enabled for Business Space in the Build it Yourself section, you can do either of the following:

  1. use Business Space to run this sample, or
  2. use the Business Process Choreographer Explorer to run this sample.

1. Using Business Space for running the sample

In the following all steps are described to set up Business Space for human tasks and to start and complete a business process.

Note:

If you run this sample in a cluster configuration where Business Space and WPS run on different nodes, make sure that the WAR (Web ARchive) module is mapped to both the server running WPS and the server running Business Space.

To start Business Space 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 Space.

To start Business Space on WebSphere Process Server, follow these steps:

  1. In a web browser, open URL http://yourhost:yourport/BusinessSpace.
  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, Business Space opens with a login screen:

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

Depending on whether you have already worked with Business Space, a Business Space start screen is displayed, for example this one:

Create new Business Space

If you have not worked with human tasks in Business Space yet, do a one-time setup on your WPS server (this step can be skipped if you run this sample again later).
Follow these steps:

  1. In the Getting Started widget of the Welcome Business Space, click Manage Business Spaces:
  2. In the Business Space Manager, click the symbol for creating a new Business Space:
  3. In the popup menu, select a name for your Business Space, for example, my Business Space.
  4. Switch to From a template and select Advanced Managing of Human Tasks and Workflows.
  5. Click OK.
  6. Click Done.

After clicking on Go to Spaces in the upper menu, your new Business Space is displayed:

Now you are ready to work on your human tasks with Business Space.

Start the sample business process

To start the human interaction process, follow these steps:

  1. Make sure HumanInteractionApp is installed on the server.
  2. Switch to Business Space.
  3. Proceed to the Manage Human Tasks tab.
  4. In the Manage Human Tasks widget, select the task template Start the HumanInteractionProcess and click the symbol for creating a new instance.
  5. In the Task Information widget, the form for completing the input data is displayed:

  6. In the input field, enter a value of type string.
  7. Click Submit.

Now a business process is started, and the human task activity of the business process (in this sample: AskQuestion) is available for the userids specified in the task template of the human task (in this sample: everybody).

Work with the human task of the sample business process

This sample business process requires a human to enter a string into a data field. This string can be used in later steps of the process. In this example, there are no later steps; instead, we will browse the persisted output (i.e. the output message) after the process is finished.

You can use either Business Space or the BPC Explorer to work with the generated human tasks. To use Business Space for working with human tasks, follow these steps:

  1. In Business Space, switch to the Work on Tasks tab.
  2. In the Tasks List widget, select AskQuestion and click the symbol for accepting and editing the task:
  3. A form for processing the task is displayed in the Task Information widget; here, the output field is prefilled with the input that was entered by the user when starting the process instance, and then passed from the process instance to the task instance.

    Note:

    Because the task was claimed by userid admin and because this userid has the privileges to see the process template details, the business process is graphically displayed in the Human Workflow Diagram widget. Without these privileges, the user can still complete the human task but would not see the diagram.

  4. Replace the text in the answer field by a text of your choice, for example, John Doe.
  5. Click Submit.
  6. The task is now completed and is removed from the Tasks List widget again.

Verify output

Output message

The human interaction process is a long-running business process, and the process output message is computed asynchronously. To display the process output message, follow these steps:

  1. In Business Space, proceed to the Create Tasks tab.
  2. Select the most recent process instance with name Start the HumanInteractionProcess.
  3. Select Actions > Open:
  4. In the Task Information widget, both the process input message and the process output message are displayed:

 

2. Using Business Process Choreographer Explorer for running the sample

Alternatively, you can use the Business Process Choreographer Explorer to run this sample.

To start the 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 sample business process

To start the human interaction process, follow these steps:

  1. Switch to the BPC Explorer.
  2. In the Process Templates section, click Currently Valid Process Templates.
  3. The Currently Valid Process Templates view is displayed:

  4. Select HumanInteractionProcess, then click Start Instance.
  5. The Process Input Message view opens:

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

Work with the human tasks of the sample business process

This sample business process requires a human to enter a string into a data field. This string can be used in later steps of the process. In this example, there are no later steps; instead, we will browse the persisted output (i.e. the output message) after the process is finished.

You can use BPC Explorer to work with the generated human tasks. To work with human tasks, follow these steps:

  1. Switch to the BPC Explorer.
  2. In the Task Instances section, click My To-dos.
  3. The My To-dos view opens:

    Note: The AskQuestion task is in the ready state.

  4. Select the task and click Work on.
  5. The Task Message view is displayed:

  6. In the answer field, enter a value of type string.
  7. Click Complete.

Verify output

Output message

The human interaction process is a long-running business process, and the process output message is computed asynchronously. To display the process output message, follow these steps:

  1. In the BPC Explorer, switch to the Process Templates view.
  2. Select HumanInteractionProcess and click Instances.
  3. The Process Instances for Process Templates are displayed:

  4. Click the process instance.
  5. The Process Instance view is displayed:

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