- Developing SOA Applications with Oracle SOA Suite
- Using the Human Workflow Service Component
- Human Workflow Tutorial
- Designing the Human Task
Designing the Human Task
Learn how to design a human task.
To design the human task:
- In the Task Title field, enter
Request for Vacation
. - Accept the default values for outcomes (APPROVE and REJECT). For this task, these outcomes represent the two choices the manager has for acting on the vacation request.
- Click the Data tab on the left side of the editor and click the Add icon to specify the task payload
- Select Add string parameter.
The Add Task Parameter dialog is displayed. You now create parameters to represent the elements in your XSD file. This makes the payload data available to the workflow task.
- Select Element. To the right of the Element field, click the Search icon.
The Type Chooser dialog appears.
- Expand and select Project Schema Files > VacationRequest.xsd > process, and click OK. Figure 31-5 provides details.
Ensure that the Editable via worklist check box is selected. This provides you with the option to modify this parameter during runtime from Oracle BPM Worklist.
Click OK on the Add Task Parameter dialog.
- Click the Assignment tab on the left side of the editor.
- From the Participants section from the Components window, grab a Single Participant type and drop it in the <Drop participant here> box, as shown in Figure 31-6. You select this type because a single assignee, the manager, acts on the vacation request task.
Oracle SOA Suite provides several out-of-the-box patterns known as participant types for addressing specific business needs. For more information, see Task Assignment and Routing.
- Double-click the participant you added.
The Edit Participant Type dialog box opens.
- In the Participant Names table, click the Add icon, and select Add User.
This participant type acts alone on the task.
- Click the Data Type column, and select By Expression from the list that is displayed. Figure 31-7 provides details.
This action enables the task to be assigned dynamically by the contents of the task. The employee filing the vacation request comes from the parameter passed to the task (the
creator
element in the XSD file you imported in Creating an Application and a Project with a BPEL Process). The task is automatically routed to the employee's manager.Figure 31-7 Selection of By Expression from the Data Type Column
Description of "Figure 31-7 Selection of By Expression from the Data Type Column" - In the Value column, click the Browse icon (the dots) to invoke the Expression Builder dialog.
- In the dropdown list in the Functions section, select Identity Service Functions.
- Select getManager. This function gets the manager of the user who created the vacation request task.
- Above the Functions section, click Insert into Expression. Place the cursor between the parentheses of the function.
- In the Schema section, expand task:task > task:payload > ns1:VacationRequestProcessRequest > ns1:creator.
where ns1 is the namespace for this example; your namespace may be different.
- Click Insert into Expression.
The Expression Builder dialog displays the XPath expression in the Expression section. Figure 31-8 provides details.
- Click OK to exit the Expression Builder dialog. Again, click OK to exit the Add Participant Type dialog.
- From the File menu, select Save All.