Time for action – configuring human task deadlines

Next, we will configure the deadlines. It makes sense to define a deadline when a human task has to be fulfilled. This prevents scenarios where a human task is assigned to a certain person or group but gets forgotten. For example, we could define that the human task for approving the book store location should be fulfilled in a certain amount of time.

If the user does not fulfil the human task in the specified time, an action will be taken. This action can be expiration, renewal, or escalation. A human task can expire after a certain time. This means that the human task will expire and the control will be returned to the caller (in our case this is our BPEL process). As the user has not fulfilled the human task, the BPEL process will not get a decision; therefore, it will need to act accordingly. Although human task expiration might not look very useful at the first sight, it prevents a human task from waiting indefinitely for the user to fulfill it and the BPEL process calling the human task from stalling.

The second option is that the human task is renewed after a certain time, which means that the human task will be initiated once again and all the users (participants) will be notified again. This way we can easily make sure that the users are notified after a certain amount of time if a human task is waiting. We can specify how many times we would like to renew the human task.

The third option is that the human task is escalated after a certain period of time. This means that the human task will be assigned to the user or group which is higher in the hierarchy. In other words, the human task will be assigned to the manager of the user who has not fulfilled it. We can configure how many escalation levels should be used for our human task and who is the highest approver title that can get the human task assigned.

For our example, we will define that our human task will renew after 5 minutes. We have selected a short time, as it will be easier to test the human task. To achieve this, we have selected Renew after and Fixed Duration of 5 minutes, as shown in the following screenshot. We should also set the Maximum Renewals count. In our example, we set it to 10:

Time for action – configuring human task deadlines

In more complex scenarios, we could define the duration by expression. In this case, we would use an XPath expression and would address a process variable.

What just happened?

We have configured a 5-minute deadline for our human task. After that deadline, it will be renewed. This means that it will be reassigned to the same user. Although 5 minutes is too short for real-world examples, it is appropriate for our example as it will make testing easier. In real-world examples, it is more likely to renew the human task after 24 hours and even to take into consideration the working days of a week.

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

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

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