Build it yourself

To build the human interaction sample, follow these steps:

Create a new module

To create a new module, complete the following steps:

  1. In the Business Integration view, click Click to add a business integration project under Projects.
    (Alternatively: from the menu bar, select File > New > Module).
  2. The New Business Integration Project window opens. Make sure Create a module is selected.
  3. Click Next.
  4. The New Module window opens.

  5. In the Module Name field, enter HumanInteraction.
  6. Click Finish.

Define the interfaces

This sample requires two interfaces: one for the process and one for the human task. To create each interface, complete the following steps:

  1. In the Business Integration view, right-click HumanInteraction > Interfaces.
  2. From the context menu, select New > Interface. The New Interface Wizard window opens.
  3. In the Folder field, enter bpc/samples/task.
  4. In the Name field, enter ProcessInterface.
  5. Click Finish.
  6. Repeat the steps above for the second interface. Use the following values for Folder=bpc/samples/task and Name=Question.

Now, add operations to your interfaces. To add operations to an interface, complete the following steps:

  1. In the interface editor, click the Add Request Response Operation button .
  2. To edit the name of the operation, click the operation name. See the table below for the operation names you need to specify.
  3. To edit the name of an input message, click the message name. See the table below for the message names you need to specify.
  4. To edit the type of an input message, click the message type, and select a type from the list. See the table below for the types you need to specify (in this sample, all types are string, which is the default).
  5. Repeat steps 4 and 5 to edit the name and type of the output message.

In the folder bpc/samples/task, create the interfaces that are listed in the following table:

Interface Namespace Operation Name Message Name Type
ProcessInterface http://bpc/samples/task/ProcessInterface process Input input string
      Output output string
Question http://bpc/samples/task/Question ask Input question string
      Output answer string

Now your interface editor will look similar to this:

On the toolbar, click the Save button .

Develop the business process

Create a new business process

To create the new business process, complete the following steps:

  1. Switch to the Business Integration view.
  2. In the navigation tree, right-click HumanInteraction > Integration Logic.
  3. From the context menu, select New > Business Process. The New Business Process window opens.
  4. Select the radio button New default Business Process.
  5. In the Folder field, enter bpc/samples/task.
  6. In the Name field, enter HumanInteractionProcess.
  7. Accept the default value for the namespace.
  8. Click Next.
  9. In the Select a Business Process Type panel, select Long-running process.
  10. Click Next.
  11. In the Select an Interface panel, select Select an interface.
  12. Click Browse. The Interface Selection window opens.
  13. Select ProcessInterface, then click OK.
  14. Make sure that process is selected as operation.
  15. Click Finish. The business process editor opens.
  16. Open the Properties view and proceed to the Details section.
  17. From the Automatically delete the process after completion list, select No.
  18. Keep the remaining default values.

Add a human task activity to the process

To add a human task activity to your process, follow theses steps:

  1. Click the human task activity icon on the palette. This icon can be found here.
  2. In the business process editor, click the connection between Receive and Reply:
  3. The human task activity will be added and the Interface Selection window opens automatically.

  4. Select Question, and click OK.
  5. The Human Task editor opens:

    Since you've already selected the Question interface, the ask operation is chosen by default (it's the only operation defined).

  6. Close the HumanInteractionProcessTask1 editor.
  7. In the HumanInteractionProcess editor, select the HumanTask component.
  8. Rename the human task activity from HumanInteractionProcessTask1 to AskQuestion.
  9. On the toolbar, click the Save button .

Implement the human task activity

To complete the implementation of our human task activity, you have to specify the process variables for the activity. Follow these steps:

  1. In the business process editor, click AskQuestion.
  2. In the Properties view, click the Details tab.
  3. Click under Read From Variable. A popup with available variables opens.
  4. Select input.
  5. Click under Store Into Variable. A popup with available variables opens.
  6. Select output.
  7. On the toolbar, click the Save button .

Adjust Business Space Settings

Enable the human task activity for Business Space

Later, in the Run the Sample section, you will use Business Space to work with the human task. For this, we have to enable the human task activity for Business Space.
Follow theses steps:

  1. In the business process editor, click AskQuestion.
  2. In the Properties view, click the Details tab.
  3. Click Open next to HumanInteractionProcessTask1. The human task editor opens.
  4. Expand the User Interface section.
  5. Click the symbol next to User Interface and select HTML-Dojo (for use in Business Space).
  6. In the Properties view of the HTML-Dojo, click New.
  7. In the popup window, click New Web Project button.
  8. In dialog, enter HumanInteractionWebproject as Project name button.
  9. Make sure the EAR Project Name is HumanInteractionApp.
  10. Accept all other defaults and click Finish. Do not switch to the Web perspective.
  11. Click OK to save the HTML file.
  12. On the toolbar, click the Save button to save the human task changes.

Enable the business process for Business Space

Later, in the Run the Sample section, you will as well use Business Space to start an instance of this business process. Because Business Space will render the display name of the first activity, here we specify a name for the Receive activity that can be easily recognized.
Follow theses steps:

  1. In the business process editor, Right-click the Receive activity.
  2. Select Show in Properties.
  3. In the Properties view, change Display Name from Receive to Start the HumanInteractionProcess.
  4. Optionally, add a description text that will as well show up in Business Space windows later on. Here, we use my first business process with a human interaction inside as description text.
  5. On the toolbar, click the Save button .
For starting an instance of this process using Business Space, it is required to specify an inline invocation task for the first activity.
Follow these steps:
  1. In the Properties view of the first activity, select the Authorization tab.
  2. Click the New button. The Human Task editor opens.
  3. Expand the User Interface section.
  4. Click the symbol next to User Interface and select HTML-Dojo (for use in Business Space).
  5. In the Properties view of the HTML-Dojo, click New.
  6. In the popup window, select the existing folder WebContent of the previously created web project.
  7. Click OK to generate the HTML file.
  8. On the menu bar, select File > Save All to save both the invocation task and the business process.

Module assembly

To finish the implementation of the human interaction process, you have to create the module assembly. Complete the following steps:

  1. In the Business Integration view, double-click HumanInteraction > Assembly Diagram.
  2. Drag and drop the HumanInteractionProcess process to the assembly editor.
  3. On the toolbar, click the Save button .

Test the process in the integrated test environment

Install the HumanInteractionApp to the test environment by using the Server > Add and Remove Projects function. This is described in detail for the HelloWorldApp in the Hello World sample.

Subsequently, refer to the Run the Sample section on how to run the HumanInteraction process in the integrated test environment.

Export process application

To create an installable application, complete the following steps:

  1. Switch to the Business Integration view.
  2. In the navigation tree, right-click the HumanInteraction module.
  3. From the pop-up menu, select Export.
  4. In the Export window, expand Java EE and select EAR file.
  5. Click Next.
  6. In the EAR application list, select HumanInteractionApp.
  7. In the Destination list, specify your destination directory.
  8. Click Finish.

Install the Human Interaction process to WebSphere Process Server

Install the HumanInteractionApp exactly as described for the HelloWorldApp in the Hello World sample.

Uninstall the Human Interaction process from WebSphere Process Server

Before you can uninstall the application, the business process and human task templates must be stopped. Follow these steps:

  1. In a browser, open the administrative console.
    The default URL is
  2. If security is enabled, enter a valid User ID and Password. Click Log in.
  3. In the navigation pane, select Applications > Application Types > WebSphere enterprise applications.
  4. From the list of applications, click on HumanInteractionApp.
  5. Under Modules, click Manage Modules.
  6. Click on HumanInteractionEJB. From this page, you will stop both the business process and the human task templates.
  7. Under Additional Properties, click Business processes.
  8. Make sure that no running or terminated process instances exist for this process template.
    Note: Process instances may exist in the following cases:
    • if you selected Long-running process as the Business Process type or under the Properties section,
    • and if you disabled the checkbox Automatically delete the process after completion in the Process Editor (by default, this checkbox is disabled).
  9. Select the HumanInteractionProcess process template and click Stop. This makes sure no more process instances of this template can be started.
  10. In the message section, click Save.
  11. In the Enterprise Applications list, select HumanInteractionApp and click Uninstall.
  12. In the Uninstall Application screen, click OK.
  13. In the message section, click Save.