28 Designing Human Tasks in Oracle BPM

Learn how to design human tasks using the different editors available in Oracle BPM, and how to associate human tasks with the user tasks in your BPM project.

For information on how Oracle BPM shows human tasks in the Business Catalog, see Working with Human Tasks.

For more information about human tasks, see the chapters in “Using the Human Workflow Service Component” part in theDeveloping SOA Applications with Oracle SOA Suite guide.

28.1 Introduction to Designing Human Tasks in Oracle BPM

Human tasks enable you to model the interaction with the end user in a a BPM process. You must use human tasks to implement the user tasks in your process.

Oracle BPM Suite provides different editors that you can use according to the requirements of the Human Task you are modeling.

Some human tasks features are only available when using them from Oracle BPM Suite. For more information about this, see Configuring a Human Task Using the Human Task Editor.

28.1.1 Typical Design Workflow

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

  • Creating the human task using the Human Task editor

  • Creating the human task using the simplified interface Oracle BPM provides

  • Use an existing human task

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.

Creating the Human Task Using the User Task Properties Dialog

  • Create a BPMN process

  • Add a user task

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

    For more information see Creating a Human Task from Oracle BPM Studio.

  • Create the corresponding taskflows using SOA Suite

Creating the Human Task Using the Human Task Editor:

Using an existing Human Task:

28.2 Creating a Human Task from Oracle BPM Studio

You can create a simple Human Task using Oracle BPM Studio. The simplified interface that Oracle BPM Studio provides hides the complexity of the Human Task editor by exposing the most important fields to configure a Human Task used in a business process.

After you create the Human Task using the Create Human Task dialog box, you can edit it using the Human Task editor if needed.

Figure 28-1 shows the Create Human Task dialog box.

Figure 28-1 Create Human Task Dialog

Description of Figure 28-1 follows
Description of "Figure 28-1 Create Human Task Dialog"

The Create Human Task dialog box enables you to define the following properties:

  • Title

    Defines the name of the Human Task that is displayed to end-users in the Oracle Process Workspace and Oracle BPM 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.

  • 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 value of this outcome is one of the values defined in the Outcomes property.

28.2.1 How to Create a Human Task from Oracle BPM Studio

You can create a Human Task from the User Task Properties dialog box 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 box appears.

    Figure 28-2 shows the Properties - User Task dialog box.

  4. Click the Implementation tab.
  5. Click the Add button next to the Human Task field.

    The Create Human Task dialog box appears.

    Figure 28-1 shows the Create Human Task dialog box.

  6. In the name field, enter a name to identify the Human Task.
  7. From they Priority List, select a priority.
  8. Select a Human Task pattern appropriate for your implementation.

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

  9. In the Title Field, enter a title for the task to display in the client application (Process Workspace and others).
  10. Optionally, you can configure the following:
  11. Click OK.

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

  12. Click OK.

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

28.2.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 BPM Worklist.

To configure the outcome of a Human Task:

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

    The Outcomes dialog box 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 box closes and the selected outcomes appear in the Create Human Task dialog box, in the Outcomes field.

28.2.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 box, click the Add button in the Parameters table.

    The Data Objects dialog box appears.

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

    The selected data object appears in the Parameters table.

  3. Close the Data Objects dialog box.
  4. Optionally you can mark the parameter as editable by selecting the Editable column in the Parameters table.

28.2.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.You can base the flow of your process on the value of the outcome target using an exclusive gateway.

To configure the outcome target of a Human Task

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

    The Data Objects dialog box appears.

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

    To add a new data object, right-click the Data Objects node and select Add.

    The selected data object appears in the Outcome Target field.

  3. Close the Data Objects dialog box.

28.2.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 Human Task editor to configure implementation details.

28.3 Editing a Human Task from Oracle BPM Studio

You can edit a Human Task using the User Task Properties dialog box or the Human Task editor. Generally you use the Human Task editor for complex human tasks.

Figure 28-2 shows the User Task Properties dialog box.

Figure 28-2 User Task Properties dialog box

Description of Figure 28-2 follows
Description of "Figure 28-2 User Task Properties dialog box"

The User Task Properties dialog box enables you to define properties using plain text, simple expressions and XPATH expressions:

  • Title

    Defines the name of the Human Task that is displayed to end-users in the Oracle Process Workspace and Oracle BPM 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 beginning.

  • 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.

28.3.1 How to Edit a Human Task Using the User Task Properties Dialog

To edit a Human Task using the User Task Properties dialog box:

  1. Open the BPMN process that contains the user task implemented with a Human Task.
  2. Right-click the user task.
  3. Select Properties.

    The user task properties dialog box appears.

  4. Click the Implementation Tab.
  5. Make changes to the properties in the Human Task Attributes and Advanced sections.

28.4 Creating a Human Task from the SOA Composite Editor

You can add a Human Task to your BPM project from the SOA Composite editor.

Typically you do this when you design human tasks before modeling the user tasks in a BPMN process.

28.4.1 How to Create a Human Task from the SOA Composite Editor

You can add a user task to a BPM project using the SOA Composite editor.

To create a Human Task from the SOA Composite Editor:

  1. Select the Application view.
  2. Expand the BPM project where you want to add the Human Task.
  3. Expand the SOA Content node.
  4. Double-click the composite.xml node to open the SOA Composite editor.
  5. From the Component Palette grab a Human Task.
  6. Drop the Human Task in the Components area of the SOA Composite.

    The Create Human Task dialog box appears.

  7. Enter a name to identify the Human Task.
  8. Optionally, modify the URL for the Human Task namespace.
  9. Optionally, check the Create Composite Service with SOAP Bindings option.
  10. Click OK.

    The Human Task component appears in the Component area of the SOA Composite.

When you create a Human Task from the SOA Composite Editor, the Human Task you created is available to implement the user tasks in your BPM project. For more information on how to do this, see Implementing a User Task with an Existing Human Task .

28.5 Implementing a User Task with an Existing Human Task

You can create a Human Task using the 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 Handling Information in Your Process Design.

28.5.1 How to Implement a User Task With an Existing Human Task

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

To implement a user task with an existing Human Task:

  1. Open the BPMN process.
  2. Right-click the user task.
  3. Select Properties.

    The Properties - User Task dialog box appears.

  4. Click the Implementation tab.
  5. Click the Browse button next to the Human Task field.

    The Browse Human Tasks dialog box appears.

  6. Select a Human Task from the list.
  7. Click OK.

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

  8. Click OK.

28.5.2 What Happens When You Implement a User Task With an Existing Human 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.

28.5.3 How to Associate the Process Payload to the Human Task Payload

To associate the process payload to the Human Task payload you must configure the Human Task, the user task and start events in the BPMN process and create a business object based on the payload XSD file.

To associate the process payload to the Human Task payload:

  1. Create a business object using the Based on External Schema option.

    1. Right-click a module.

    2. Select New and then select Business Object.

    3. Select Based on External Schema.

    4. Click the Browse button.

    5. Select Copy to Project.

    6. Click Browse Resources.

      The Type Chooser dialog box opens.

    7. Select the type of the business object from the payload XSD file.

  2. Edit the start event in your BPMN process.

  3. Define a custom argument using the business object you created as its type.

  4. Add a process data object to your process using the business object you created as its type.

  5. Define the data associations between the custom argument and data object.

  6. In the Human Task editor, click the Data tab.

  7. Select Add other payload from the list in the Add button.

  8. Select the payload element in the Type Chooser dialog box.

  9. In the Process editor, right-click the user task and select Properties.

  10. Define the data associations between the process data object and the task payload.

28.6 Editing a Human Task Using the Human Task Editor

Configuring complex human tasks usually requires you to use the Human Task Editor to edit them. This allows you to edit properties that are not displayed when you use the simplified interface that Oracle BPM provides.

Figure 28-3 shows the Human Task editor.

28.6.1 How to Edit a Human Task Using the Human Task Editor

You can edit a Human Task used in your BPM project using the Human Task editor. Generally you use the Human Task editor to edit complex human tasks.

To edit a Human Task using the Human Task Editor:

  1. Open the BPMN process that contains the user task implemented with a Human Task.
  2. Right-click the user task.
  3. Select Open Human Task.

    The Human Task editor appears.

  4. Make changes to the Human Task.

28.7 Configuring a Human Task Using the Human Task Editor

Learn how to configure those properties that are only available when using human tasks from Oracle BPM Suite.

The rest of the properties are shared with Oracle SOA Suite. For more information on how to configure these properties, see Creating Human Tasks in Developing SOA Applications with Oracle SOA Suite.

The Human Task editor enables you to configure the following sets of properties:

Some human tasks features are only available when using humans tasks from an Oracle BPM Suite Installation.

When you use human tasks from an Oracle BPM Suite installation you must take into account the following considerations:

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

  • The owner property in the process context is set using the participant assigned to the user task that contains the Human Task.

  • If your process contains an initiator task the creator attribute in the process context is automatically set using the participant assigned to the initiator task.

  • When you specify the completion criteria for a parallel participant you can set the default outcome as one of the previous outcomes.

28.7.1 How to Specify an E-mail Address for the Recipient of a Notification

When using the Human Task editor in a BPM Suite installation, you can specify an email address for the recipient of a Notification.

To specify an email address for the recipient of a notification:

  1. Open the Human Task editor.
  2. Click the Notification tab.
  3. Double-click the Recipient list.

    The Recipient list is an editable list, when you double click it, it becomes a text field.

  4. Enter the recipient's email address.

    Optionally you can use the buttons next to the Recipient text field to look up the email address in an application server or to specify the email address using XPath.

Note:

When sending a notification to a recipient specified using an email address, the notification service uses the user context of an assignee to obtain the task information to include in the notification.

28.7.2 How to Configure Oracle UCM Repository to Store Task Attachments

You can configure Human Tasks to store attachments in the UCM repository. These attachments may contain one or more metadata properties. You can assign values to these properties or configure them to allow the user to provide the value.

Note:

When a file is attached from the Process Tracking page, it goes to the BPM repository and not to the UCM repository. Hence, even if the UCM repository is unavailable, the Process Tracking page allows you to upload files. However, when the UCM repository is configured and Human Tasks are designed to upload attachment to the UCM repository, the Tasks page uploads files to the UCM repository. However, the Process Tracking page always uploads the files to BPM repository.

To configure Oracle UCM Repository for task attachments:

  1. In the Project Navigator tree, expand the Business Catalog node.

  2. Expand the Human Tasks node.

  3. Double-click the Human Task you want to configure.

    The Human Task Editor appears.

  4. Click the Documents tab.

  5. Select Use Document Package.

    A section to configure metadata properties appears. The table already contains the mandatory standard metadata: Security Group and Document Type.

  6. Optionally add new standard or custom metadata properties:

    1. Click the Add button.

    2. Click the Name column to select a standard property from the list or to enter a custom name.

    3. Click the Value column to assign a value to the property. Select By Name to provide the text to assign the value to the property, or By Expression to provide an expression.

    4. Click the Display column to select a display mode:

      Editable: the user can provide a value in the task form when uploading the attachment.

      Hidden: the value does not appear in the task form

      Read-Only: the value appears in the task form but the user cannot modify it

    Note:

    Custom metadata does not appear in the task form, so you must map the value to a task payload or provide a static value.

28.8 Working with Screenflows

Screenflows enable users to work on all of the tasks in a process in sequence.

For example, when a user completes a task in a process, and if the next task is assigned to the same user, then the next task is automatically shown in the same flow, without the user having to return to the task list.

28.8.1 Creating a Screenflow

Screenflows are created in HumanTask projects to create a task that automatically flows from screen to screen.

To create a screenflow, add a ScreenFlowMode entry in the HumanTask project before deploying it. Add this entry to all of the Human Tasks that are to be part of the screenflow, except for the last task of the screenflow. After creating a screenflow in BPM Studio, enable it in Enterprise Manager, and then test it in Workspace.
  1. In BPM Studio, add an entry for ScreenFlowMode in the hwtaskflow.xml file.
  2. In Enterprise Manager, enable the Process Broker service:
    1. Log in to Enterprise Manager as an administrator, and navigate to soa-infra > Administration > System MBean Browser.
    2. Navigate to Application Defined MBeans > oracle.as.soainfra.config > BPMNConfig > bpmn or search for the disableProcessBroker parameter.
    3. Set the disableProcessBroker parameter to false and click Apply.
    4. Restart the SOA/BPM WebLogic server.