Build it yourself

This section describes how to develop, deploy and test the process with a parallel approval task included. It uses a predefined project and shows how to

Import the prepared project

A project has been prepared, which serves as the basis to build this sample. The project contains the BPEL process and human task implementations when executing the process using the Business Space. To import the prepared project interchange file, perform the following steps:

  1. Download the ECRequestSample_Start.zip file, and save it to a temporary directory.
  2. In WebSphere Integration Developer, click File > Import. The Import window opens.
  3. Select Other > Project Interchange.
  4. Click Next. The Import Project Interchange Contents window opens.
  5. Click Browse next to the From zip file field.
  6. Browse to the temporary directory and select the zip file you downloaded in step 1.
  7. Click Open.
  8. Select your workspace directory as your Project location root.
  9. Click Select All.
  10. Click Finish.
  11. Wait until the automatic build process has finished.

You may notice that there are several problems indicated. We will fix those in the following steps.

Engineering Change Request Process

Be sure to perform this exercise in 'Business Integration' perspective:

WebSphere Integration Developer - Business Integration Perspective

Expand the project and open the imported process model. Familiarize yourself with the process. Perform the following steps:

  1. Expand the project tree EngineeringChangeRequest > Integration Logic > Processes > EngineeringChangeRequest.
  2. Familiarize yourself with the process. It includes the Receive with Start EC Request, the Approve EC Request for parallel ownership to be defined, and depending on the vote a human task for notification on approval or rejection. The Assign node is used to create a business object that includes the aggregated variables as well as those context variables identifying the request.

Specify the Group Approvers

For the parallel approval sample we need several people to act as approvers. We define this group via the Admin Console, allocate members, and associate it with the Approve EC Request human task.

  1. Log in to the Admin Console of WebSphere Application server.
    The default URL is
  2. Select the sub menu Users and Groups > Manage Groups, the Manage Groups window opens.
  3. Click Create.
  4. Specify the Group name Approvers and any description you like.

  5. Click Create. Click Close as we don't want to specify further groups.
  6. Double click Approvers that opens the group properties window. Click Members to allocate existing users.
  7. Click Add Users..., the Add Users to a Group window opens
  8. Click Search to perform a wildcard search to select users.
    Highlight the users bdaniel, dcampbell, dedwards, jjames, click Add . The password of all provided userids is wid.
  9. Verify that these users were successfully added to the Approvers group. Click Close .

  10. Click General. Click OK.
  11. Mark the Unique Name of the Approvers group, right click with your mouse and Copy the name to your the Clipboard
  12. Switch back to your process diagram. Double click the Approve EC Request human task. The To-do task window opens.
    Select the People Assignment (Receiver) > Potential Owners area. Open the Properties tab.

  13. Replace Everybody under Properties > Assign People > People assignment criteria by Group Members.

  14. Paste the content of your clipboard cn=Approvers, o=defaultWIMFileBasedRealm for the GroupName* Value.

  15. Perform the people test search to verify that the access to the user registry and group resolution work properly.
    Click Test.


    Click Search. The result in the the refreshed window shows the group members retrieved.

  16. Click OK. Click Ctrl + S to save your specification.

Specify the parallel approval task

The parallel approval is specified in detail by its propagation details, completion criteria, and aggregation functions.

  1. Parallel ownership selection
    Click People Assignment (Receiver)> Potential Owners > Ownership: Single. This opens the Change Ownership Pattern window.
  2. Select Parallel and click OK. The Properties page opens and offers the additional tabs.
    Note: The People Assignment (Receiver) area needs to be selected whenever you want to access the parallel approval settings.
  3. Propagation
    Subtasks are initially assigned with the default authorization for a main task. Owners of the subtasks will be able to see the results of other subtasks which might not be the right choice for ballot votes.

    1. Select the Propagation tab
    2. Stay with All when specifying the people assignments propagated to the subtasks.
    3. Select the Completion tab.

  4. Completion
    Specify conditions under which the main task ends before all owners have completed their subtasks. A task can be preemptively be completed based on the time that elapsed since it was created or when conditions defined by an expression are met. In the sample we specify a condition describing that 70 % of the subtask owners should have voted within and an elapsed duration of 5 minutes.

    1. Set the field to End the task based on the time that elapsed since it was created.
    2. Keep Calendar type to Simple and set the duration to 5 Minutes.
    3. Set the field to End the task when the following condition is met and keep the setting of Simple condition.

    4. Click Select a template.

    5. Click Percentage of workers.

    6. Set Number to 70 %.
    7. Select the Aggregation tab.

  5. Aggregation
    Select the business object fields with its data type to set the aggregation condition. Select the function that you want to use to aggregate the data. The choice of function depends on the data type of the selected business object field.

    1. Select the business object field EC_Vote of type boolean and open the Aggregation Function Editor.

      The editor to select and specify and aggregation function opens.

    2. Select Function equals vote.
      Note: Aggregation function - vote in percentage.
      This function aggregates the output messages for all of the subtasks of the parallel-ownership task and returns values of type Boolean. The output messages are converted to Boolean values according to the XPath Boolean function before the function runs.
      1. This function returns the Boolean value that occurs most often if the occurrence is above the specified percentage, and if there is no tie. The result of the vote is determined in the following way: The specified percentage and the count of the subtasks result in a minimum value that must be exceeded by the occurrence of a single Boolean value.
      2. From the values that qualify from step 1, return the value that occurs most frequently. If no output messages exist or a tie occurs, false is returned.

    3. Specify the Value of approvals (EC_Vote equal true) to 40.
      I.e. the engineering change request will be approved, if 40 percent of all potential subtask owners voted with true when the completion condition (5 minutes elapsed time or 70 % of workers completed their subtask) was reached.

      Click OK.

    4. Repeat the previous step for the business object field Comment of type string and open the Aggregation Function Editor.
    5. Select Function equals concatWithDelimiter.
    6. Click OK.

    7. Repeat the same for the Reviewer variable.

    8. Click Ctrl + S to save the task specification.
Next, you can do the export, deployment and test of the application and proceed with Run the Sample section.

Export the enterprise application

To create an installable application, complete the following steps:
  1. In the Business Integration view, right-click the EngineeringChangeRequest module.
  2. From the context menu, select Export.
  3. In the Export window, select Java EE > EAR file.
  4. Click Next.
  5. In the EAR project list of the EAR Export window, select EngineeringChangeRequestApp.
  6. In the Destination list, specify your destination directory.
  7. Click Finish.
or

Deploy your project in WID to the integrated test environment

  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 Add and Remove Projects.
  4. Select Add All >> and click Finish.

    Wait until the project has been successfully deployed.

Continue on with Run the sample.