14 Using Human Tasks

This chapter describes how to implement BPMN user tasks using Human Tasks. You can use an existing Human Task component created using the SOA Human Task editor, or you can create a new Human Task using the simplified interface Oracle BPM Studio provides.

This chapter includes the following sections:

For detailed information about Human Tasks, see Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

14.1 Introduction to Human Tasks in BPM

The implementation of user tasks requires you to define a Human Task. You can use an existing Human Task or define a new one.

If your project contains Human Tasks, then they automatically appear in the business catalog under the HumanTasks predefined module.

You can add new Human tasks to your project in the following ways:

  • Using the simplified interface Oracle BPM Studio provides

  • From the SOA New Gallery

  • From the SOA Composite Editor

When you double click a Human Task component in the business catalog, Oracle BPM Studio opens the SOA Human Task editor. You can edit the Human Task using this editor.

Figure 14-1 shows a Human Task component in the Sales Quote example.

For more information on how to define Human Tasks using Oracle SOA Suite, see the following chapters in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite:

Figure 14-1 Human Task components in the Business Catalog

Description of Figure 14-1 follows
Description of "Figure 14-1 Human Task components in the Business Catalog"

At run time, when a token arrives at a user task control is passed from the BPMN process to the Oracle Human Workflow. Although both are part of Oracle BPM run time, control is not passed back to the BPMN process until the Human Tasksis completed.

After the workflow is complete, control is passed back the BPMN process, any required data objects are passed back to the user task, and the token moves to the next sequence flow of the process.

14.1.1 Typical Design Workflow

There are two approaches to working with Human Tasks in Oracle BPM:

  • Creating the Human Task using the SOA Human Task editor

  • Creating the Human Task using the simplified interface Oracle BPM provides

The approach you choose depends on how you plan your work, how you divide it between the developers in your team and the complexity of the Human Tasks you are developing.

Note:

When you create a Human Task using Oracle BPM Suite, the enableAutoClaim property is set to true by default.

Creating the Human Task Using the SOA Human Task Editor:

  • Create a Human Task using the SOA Human Task

  • Create the corresponding taskflow using SOA Suite

  • Create a BPMN process with user tasks

  • Implement the user tasks in the BPMN process using the defined Human Tasks

Creating the Human Task Using Oracle BPM Human Task Editor

  • Create a BPMN process

  • Add a user task. From the user task implementation properties dialog, create a Human Task.

  • Create the corresponding taskflows using SOA Suite

14.2 Assigning an Existing Human Task to a User Task

You can create a Human Task using the SOA Human Task editor and then assign that Human Task to the implementation of a user task.

You must also define how the data objects in your BPM process map to the input and output arguments of the Human Task. You can do this using data associations or transformation. For more information on data associations and transformations, see Chapter 8, "Handling Information in Your Process Design".

14.2.1 How to Assign an Existing Human Task to a User Task

You can implement a user task using an existing Human Task that you created for another user task or using the SOA Human Task editor.

To assign an existing Human Task to a user task:

  1. Open the BPMN process.

  2. Right-click the user task.

  3. Select Properties.

    The Properties - User Task dialog appears.

  4. Click the Implementation tab.

  5. Click the Browse button next to the Human Task field.

    The Browse Human Tasks dialog appears.

  6. Select a Human Task from the list.

  7. Click OK.

    The Browse Human Tasks dialog closes and the selected Human Task appears in the Human Task field.

  8. Click OK.

14.2.2 What Happens When You Assign an Existing Human Task to a User Task

The user task uses the existing Human Task for its implementation.

The SOA Composite displays the relationship between the BPMN process and the Human task by adding a wire between them.

When the BPMN Service Engine runs the user task implementation it invokes the Human Workflow Service with the parameters defined in the data association of the user task. When the Human Workflow Service finishes running the Human Tasks it provides the result to the BPMN Service Engine using the defined data association.

14.3 Creating a Human Task from Oracle BPM Studio

You can create a simple Human Task using Oracle BPM Studio. The simplified interface Oracle BPM Studio provides hides the complexity of the Human Task editor by exposing only those fields that are relevant to Oracle BPM. After you create the Human Task using the simplified editor, you can edit it using the SOA Human Task editor if needed.

The simplified Human Task editor Oracle BPM Studio provides, enables you to define the following properties:

  • Title

    Defines the name of the Human Task that is displayed to end-users in the Oracle BPM WorkSpace and WorkList applications.

  • Priority

    Specifies a priority for the Human Task. Valid values are between 1 (highest priority) and 5 (lowest priority). The default value is 3.

  • Re-Initiate

    Restarts the approval process from the begining

  • Outcomes

    Specifies the outcome possible outcome arguments of the Human Task. Oracle BPM Worklist displays the possible outcomes you select as the available tasks to perform at run time.

  • Parameters

    Define the Human Task payload. The Human Task data association is based on the parameters of the Human Task. The data association maps the data objects as input arguments.

  • Outcome Target

    Specifies a String data object to store the outcome argument of the Human Task. You can only select one data object.

The Advanced User Task Properties enable you to define the following properties:

  • Initiator

    Specifies the user who initiates a task. The initiator can view their created tasks from Oracle BPM Worklist and perform specific tasks, such as withdrawing or suspending a task.

  • Owner

    Specifies the User ID of the task owner

  • Identification Key

    Defines a user-defined ID for the task. For example, if the task is meant for approving a purchase order, the purchase order ID can be set as the identification key of the task. Tasks can be searched from Oracle BPM Worklist using the identification key. This attribute has no default value.

  • Identity Context

    This field is required if you are using multiple realms. You cannot have assignees from multiple realms working on the same task.

  • Application Context

    Specifies the name of the application that contains the application roles used in the task. This indicates the context in which the application role operates.

14.3.1 How to Create a Human Task from Oracle BPM Studio

You can create a Human Task from the User Task Properties dialog in Oracle BPM Studio.

To create a human task from Oracle BPM Studio:

  1. Edit the BPMN process.

  2. Right-click the user task.

  3. Select Properties.

    The Properties - User Task dialog appears.

  4. Click the Implementation tab.

  5. Click the Add button next to the Human Task field.

    The Create Human Task dialog appears.

  6. In the name field, enter a name to identify the Human Task.

  7. From they Priority List, select a priority.

  8. If you want to use an approval management pattern, then you must select one from the Pattern list.

  9. In the Title Field, enter a title for the WorkList to display.

  10. Optionally, you can configure the following:

  11. Click OK.

    The Create Human Task dialog closes and the Human Task field in the User Task Properties dialog shows the Human Task you created.

  12. Click OK.

    The User Task Properties closes and saves the implementation you configured for the user task.

14.3.2 How to Configure the Outcome of a Human Task

When you create a Human Task from Oracle BPM Studio you can configure the outcome of the Human Task. The outcome values you configure appear as the available actions of the Human Task in Oracle Worklist.

To configure the outcome of a Human Task:

  1. In the Create Human Task dialog, click the Browse button next to the Outcomes field.

    The Outcomes dialog appears.

  2. Select one or more outcomes, or click the Add button to add a new custom outcome.

  3. Optionally click Outcomes Requiring Comment, to select those outcomes that require comments.

  4. Click OK.

    The Outcomes dialog closes and the selected outcomes appear in the Create Human Task dialog, in the Outcomes field.

14.3.3 How to Add a Parameter to Human Task

You can add multiple parameters to a Human Task to build the Human Task payload. Oracle BPM Studio uses this parameters to create the data association of the user task that uses the Human Task.

To add a parameter to a Human Task:

  1. In the Create Human Task dialog, click the Add button in the Parameters table.

    The Data Objects dialog appears.

  2. Select a data object from the Data Objects dialog and drop it on the Parameters table.

    The selected data object appears in the Parameters table.

  3. Close the Data Objects dialog.

  4. Optionally you can mark the parameter as editable by selecting the Editable column in the Parameters table.

14.3.4 How to Configure the Outcome Target of a Human Task

When you create a Human Task you must define an outcome target. The outcome target maps the result of the Human Task to a String data object in your BPM project.

To configure the outcome target of a Human Task

  1. In the Create Human Task dialog, click the Add button next to the Outcome Target field.

    The Data Objects dialog appears.

  2. Select a String data object from the Data Objects dialog and drop it on the Outcome Target field.

    The selected data object appears in the Outcome Target field.

  3. Close the Data Objects dialog.

14.3.5 What Happens When You Create a Human Task from Oracle BPM Studio

The Human Task automatically appears in the HumanTasks predefined module in the business catalog. You can use the Human Task to implement the user task you are editing or other user tasks in the BPM project.

You can edit the created Human Task using the SOA Human Task editor to configure implementation details.

14.4 Using Human Task Patterns in Oracle BPM

Human task patterns allow you to use a predefined flow to create the Human Task. These predefined patterns contain standard process flows that are common to all business processes.

Oracle BPM supports the following Human Tasks patterns:

  • Complex

  • FYI

  • Group

  • Initiator

  • Management

  • User

You can add a Human Tasks that uses patterns by selecting the specific user task in the Interactive Activities section in the Component Palette, or you can add a generic user task and when you create the Human Task select the pattern you want to use.

For more information about Human Task patterns, see Chapter 25, "Using Approval Management".