Time for action – testing the human task

To test our BPEL process with the human task, we will first need to start the BPEL process. We do this the same way as we did in the previous chapters. If we look at the trace of the instance, we can see that the instance is still running and is waiting for the BookstoreApproval human task to complete.

Worklist application

To complete the human task, we have to log in to the Oracle BPM Worklist application using the URL http://host_name:port/integration/worklistapp/, where host_name is the name of the host on which the worklist application is installed and port is the port number of the SOA managed server (default is 8001). Oracle BPM Worklist is a very powerful application, not only allowing users to act on tasks, but also providing the following features:

  • Customizing the visual appearance and behavior
  • Reassigning tasks to other users
  • Escalating, renewing, withdrawing, and suspending tasks
  • Setting the vacation period to automatically reassign tasks during absence
  • Creating reports on task productivity, time distribution, and so on
  • Sending notifications and alerts

However, we will not discuss advanced features in this section. Now, we log in to the BPM Worklist application as the user weblogic, as the task is assigned to him. The BPM Worklist application opens as shown in the following screenshot:

Worklist application

By default, the Inbox worklist view is selected and the user can see all tasks assigned to him in the My Tasks list. In our case, there is only one active task: bookstore approval. Remember that this is the name of the human task that we set during the creation of the human task definition.

If we want to see the task details, we have to select the task. The generated ADF task form displaying the task details shows at the bottom of the page.

Worklist application

Completing the task

In the upper-left corner, there is a task title. In the upper-right corner, we can see two buttons (Approve and Reject), which correspond to the defined task outcomes. In order to complete the task, we have to click on one of those two buttons. In the Contents section, we can see the payload of the task, displaying information about the selected flight ticket. At the bottom of the task form, we can also see the task history and add comments and attachments.

Now, we will complete the task by clicking on the Approve button (we will approve the flight ticket). The task is completed and is removed from the My Tasks list.

If we look at the flow trace of the instance, we can see that the instance has successfully completed.

Completing the task

We have successfully added a human task to our BPEL process, deployed the BPEL process and the human task form, executed the BPEL process, and completed the human task.

Pop quiz – human tasks

Q1. What are the outcomes of a human task?

  1. Can be freely defined
  2. Always APPROVE and REJECT
  3. APPROVE, REJECT, and ERROR

Q2. A human task can be assigned to:

  1. A specific user
  2. A group
  3. It cannot be assigned

Q3. What is escalation?

Q4. To add a human task to the BPEL process, we use:

  1. <assign>
  2. Special human task activity
  3. <invoke>

Q5. Autogenerated task forms use:

  1. ADF
  2. ASP.NET
  3. PHP
..................Content has been hidden....................

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