Time for action – creating a human task definition

To create a new human task definition, we will start at the composite diagram. We will drag-and-drop the Human Task service component from the Component Palette onto the composite application. We will do this the same way as we have done with other components, such as the BPEL process.

We will proceed as follows:

  1. Drag-and-drop the Human Task service component from the Component Palette onto the composite application diagram.
  2. The Create Human Task window will open. We will set the name of the human task to BookstoreApproval. For the namespace, we will use http://packtpub.com/Bookstore/BookstoreApproval. If we invoke the human task within the application composite (in our case from the BPEL process), we will leave Create Composite Service with SOAP Bindings unchecked. We would check the option if we wanted a separate web service endpoint to be created for the human task. This would enable invoking the human task from external applications via the web service call.
    Time for action – creating a human task definition
  3. Next, we will wire the human task with the BookWarehousingBPEL process:
    Time for action – creating a human task definition

By wiring the human task and the BPEL process, a partner link for the human TaskService is automatically created in the BookWarehousingBPEL process.

What just happened?

We have created the BookstoreApproval human task definition and added it to our composite diagram. We have also wired the BookstoreApproval human task to the BPEL process. This way we have enabled the BPEL process to create human task instances based on the human task definition. During runtime, a BPEL process will create several human task instances (we will simply call them human tasks), all based on the same human task definition. In more complex examples, more than one BPEL process can use the same human task definition to create human tasks.

Human task definitions are reusable artifacts. They can be found in the project tree in the HumanTasks folder. Several components, not only BPEL processes, within the same composite can use the human task definition to create human tasks.

However, a human task definition first needs to be configured. We will do this in the next section.

Configuring human tasks

After we have created the human task definition for our BookstoreApproval human task, we need to configure it. We will need to set up several parameters, such as Human Task title and outcome, payload that will define the data that is sent to the human task and received as an outcome. We will also need to assign the human task to a specific user or group of users, who are responsible for fulfilling the human task. Sometimes we will know exactly which user should fulfill the task. Even more often, we will assign the human task to a group of users, such as an order department. Any user from this group will be able to claim and fulfill the human task.

Furthermore, we will set the deadlines that will define when a human task must be completed. Finally, we will configure the notifications that will define who to notify if the human task is not completed in the specified time or if an error occurs.

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

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