IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Create user interfaces for business processes > Building Heritage Coaches > Examples of building services with Heritage Coaches

Building a Human service with Heritage Coaches

Build a Human service when you want a step in your BPD to create an interactive task that process participants can perform in a web-based user interface.

When you build Human services, you include Coaches, which are the web-based forms that provide process-related data to users as well as collect input from those users. Coaches enable you to easily add standard fields and controls such as radio buttons, drop-down menus, and so on.

If you add an activity to a non-system lane in a BPD, the activity is initially implemented using the default human service. You can double-click an activity in a non-system lane to open the default human service. By examining the service components and running the default service in the Inspector, you can get an idea of how Human services work and how Coaches are used to display and collect data from process participants.

The following steps describe how to build a sample human service using example values. The service in the sample enables employees to enter expenses for the Expense Reimbursement BPD. This BPD contains an activity called Enter Expenses and a private variable called request. The request variable is an EmployeeReimbursement business object, which has id(String), type(String), amount(Decimal), and status(String) parameters. See Create business objects for information. For your own implementation, you might not use the same steps or names.

The following procedure shows how to use the Activity Wizard to create a Human service. You can also create a human service from scratch as described in Create a service.


Procedure

  1. Starting with the Expense Reimbursement BPD, right-click the Enter Expenses activity and select Activity Wizard from the list of options.

  2. In Activity Wizard - Setup Activity, make the following selections:

    Recommended selections in Activity Wizard - Setup Activity
    Option Selection
    Activity Type User Task
    Service Selection Enable the radio button for the Create a New Service or Process option

  3. Type a name for the new service in the Name field. (The name for this sample service is Enter Expense.)

  4. In Activity Wizard - Setup Activity, click the Next button.

  5. In Activity Wizard - Parameters, choose the existing process variables to use as input and output for this new service.

    1. You can see the private variable named request. For this sample, click true in the Input field to change the setting to false and leave the Output field set to true. This enables you to collect the data for the expense using this new service and then output those values for the subsequent process steps to act upon.

    2. Click the Finish button. The new service is created and attached to the activity. The new service includes a single Coach.
  6. Double-click the activity for which you created the new service using the Activity Wizard. The new service opens in the Designer.

  7. Click the Coaches tab and then click the listed Coach component. Because you used the Activity Wizard, the Coach includes a form element for each of the parameters in the request structure. The Coach designer is where you customize the Coach layout and create or edit the bindings between inputs and outputs. Notice that when the Coach designer is open, the Palette view shows all the elements—Sections and Controls—that you can use in a Coach. (Hover over a control to view a brief description. See Building Heritage Coaches for more information about the Coach designer.)

    The items in the palette are described in the links at the bottom of this page.

  8. In the Coach designer, right-click the Status control (input text field) and select Delete from the list of options. The status of a request is not data that we need to collect from employees, but is a value set later after a request is further processed and so it can be removed.

  9. In the Coach designer, click the Id control (input text field). In the properties, you can see the label for the field is Id: to match the parameter in the request variable. Change the label to Employee ID: so that employees know exactly which ID to provide.

  10. In the Coach designer, click the Type control (input text field). In the properties, you can see the label for the field is Type: to match the parameter in the request variable. Change the label to Employee type:.

  11. To enable employees to select from an existing list of employee types, in the properties for the Employee type control (input text field) click the drop-down list for Control Type and choose Single Select.

    1. Select the Presentation option in the properties. In the Widget Style section, choose Drop Down List for the Widget Type option.

    2. In the Manual Data section, click the Add button to add a value and associated display text for each option that you want in the drop-down list.

  12. To add a Cancel button to the Coach, select the control that contains OK in the Coach designer.

    1. In the Presentation properties for the control, go to the Buttons section and click Add.

    2. In the Button Details, enter Cancel for the label and click Is Cancel.

  13. Click Save in the main toolbar.

  14. Click the Preview tab at the bottom of the Coach designer to view the Coach. The Preview tab shows how the Coach will appear to users when the BPD runs. You can also click the Run Service button in the upper right to view the Coach in a web browser.

Examples of building services with Heritage Coaches