Creating task definition and the task payload

The General section helps you to define task definition. In this section, you can specify details such as the task title, description, task outcomes, task category, task priority, and task owner.

How to do it...

Here you will learn to create a task definition.

I. Define Task Title and Description:

  1. Go to the BPM Navigator, SalesToContractDemo |Business Catalog |Human tasks, and click on the ManagementApproval.task file.
  2. This will open the Human Task editor.
  3. Go to the General section.
  4. In the Task Title, select Text and XPath to enter a combination of Text and XPath expressions (dynamic expressions) from the input schema. Expand Schema and get the Opportunity ID and Enter Text as follows: Management Approval for: /task:task/task:payload/ns0:QuoteRequest/ns0:Summary/ns0:OpportunityID.
  5. XPath will get auto generated when you click on the Task | payload | QuoteRequest | Summary | OpportunityID.
    How to do it...
  6. Click OK in the Expression Builder.
  7. Enter Management Approval for Quotation as Description of the Task in the Task definition.
  8. When you have finished, click Save.

II. Define Task outcome, priority, and category:

Task outcomes capture the possible outcomes of a task. For a Management Approval task, a manager or a group of managers will either ACCEPT or REJECT the task.

How to do it...
  1. Click on the search icon to the right of the outcome. This will open Outcomes Dialog.
  2. Select APPROVE and REJECT from the outcome's list.
  3. Click OK.
  4. You can even create custom outcomes by clicking on the green plus (+) icon in the outcome dialog. Also you can select which outcomes will have comments. Click to select an outcome to which an assignee adds comments in the Oracle BPM Worklist at runtime. The assignee must add the comments and perform the action without saving the task at runtime.
  5. Click on the Priority Drop Down and select a Priority. If management approval is of normal priority, let's choose 3 as Normal from the priority list. 1 is considered as the highest priority.
  6. Leave the Categories file blank as you will not categorize the Management Approval Task.
  7. However, you can categorize tasks either by Entering a Static Value or using an expression builder to provide a dynamic value. The category displays in Oracle BPM Worklist. You can filter tasks based on category and create views on categories in Oracle BPM Worklist.
  8. When you have finished, click Save.

III. Defining Task Owners:

  1. Go to the Task Owner section in the General tab.
  2. From the drop-down, select User, and in the method selection drop-down, select Static:
    How to do it...
  3. Click the Search icon to Open the Identity Lookup and choose salesrepresentative from the user list.
    How to do it...
  4. Here, the task owner is selected by browsing the embedded user directory.
  5. Click OK.
  6. When you have finished, click Save.

How it works...

The title, entered into Title in Task Definition, provides a visual identifier for the task. This task title displays in Oracle BPM Worklist.

Oracle BPM Worklist displays the outcomes you specify here as the possible task actions to perform during runtime. If you have categorized tasks, then you can filter tasks based on category and create views on categories in Oracle BPM Worklist.

There's more...

In this section, you will see how to create task owners dynamically and create a task payload.

Choosing a Task Owner dynamically

You can select the Dynamic method, which will open the Expression builder. If the task payload has Owner information, then you can select it in the Expression Builder. Or you can use identity functions like getmanager() to get the manager of the user entered into the function, as shown in the following screenshot:

  1. Select XPath as the method.
  2. Click Expression builder.
  3. Select Identity Service Function from the drop-down list and choose the desired function.
    Choosing a Task Owner dynamically

Creating a task payload

You will not be using the data section of the task payload definition for the Management Approval Human Task as you have already assigned data as input parameters to this Human Task.

However, one can use the Data section to specify the payload of the task defined in the schema (XSD). You create parameters to represent the elements in the XSD file by carrying out the following steps. This makes the payload data available to the workflow task.

  1. Go to Data Section in the Task Definition editor.
  2. Click on the green plus (+) to add a task parameter. This will open the Add task Parameter dialog.
  3. Select variable and choose the Element radio and click Browse to choose an Element Type from the Project Schema.
    Creating a task payload
  4. Select the checkbox Editable Via Worklist to enable users to edit this part of the task payload in Oracle BPM Worklist.
  5. Click OK twice and then Save.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.82.154