Time for action – assigning a human task

Each human task has to be assigned to a human to fulfill it. Such a human is called a participant. Generally, we can assign a human task to a specific user or group of users. In the latter case, a user has to claim a task before he can start working on it. We assign a human task to a specific user if we know exactly who should fulfill the task. Otherwise, we can assign the task to a group, and a user (for example an employee) from that group can claim the task and fulfill it.

To simplify our example, we will assign the human task to a specific user:

  1. To assign the human task, we will switch to the Assignment tab, where we can assign the human task to a user, group, or an application role.
  2. We will drag-and-drop the Single Participant component from the Components window to the main assignment window.
    Time for action – assigning a human task
  3. We double-click on the added participant. The Edit Participant Type dialog opens. We will use the default type (Single) and enter the label of the participant (Approval Manager). Then we will click on the plus sign to add a participant and select Add User. Again, we will assign the task to the weblogic user. Similarly, as we did earlier, we will see the list of users and groups, which have been created in the WebLogic user realm. We could create additional users and groups within the WebLogic user realm. For more information about adding users and groups, refer to http://docs.oracle.com/cd/E24329_01/web.1211/e24484/realm_chap.htm.
    Time for action – assigning a human task
  4. Instead of static assignment, the user could also be set dynamically using the value from the task payload. In that case, we would have to change the data type to By Expression and use Expression Editor to compose the XPath expression. After we have made the assignment, we should see the following:
    Time for action – assigning a human task

    In addition to assigning the user participants that will need to fulfill the human task, we can also assign the user who will be responsible for performing corrective actions in case of errors, and the user who will be able to review the human task.

  5. To assign the Error Assignee, let's go to Task Definition Editor and click on the Error Assignees link under the Assignment tab. The Add Error Assignees dialog will open. Click on the green plus icon and add the weblogic user as Error Assignee:
    Time for action – assigning a human task

What just happened?

We have assigned the users for the human task, who should fulfill it. We have seen that there are several options for user assignments, from simple assignments to a specific user, over assignments to groups, and complex assignments. In our example, we have assigned the human task to the weblogic user. We have also assigned error assignees, who are responsible for handling errors. In our example, we have used the same weblogic user. In real-world examples, we would first create additional users and groups in the WebLogic realm and select from them. Creating users and groups is out of the scope of this chapter, as it is specific to the application server that is used. For WebLogic, refer to http://docs.oracle.com/cd/E24329_01/web.1211/e24484/realm_chap.htm for more information about adding users and groups.

For more information on human tasks refer to http://docs.oracle.com/middleware/1213/soasuite/develop-soa/soa-bpm-human-task-design.htm#SOASE87304.

In the next step, we will continue with the configuration of deadlines.

..................Content has been hidden....................

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