IBM BPM, V8.0.1, All platforms > Get started with IBM BPM > Key concepts > BPEL processes and human tasks > Human tasks overview > Task instances > Modification of task instance properties at run time

Changes to the expiration, deletion, and due times for tasks at run time

Sometimes a business situation requires that you change the due, expiration, or deletion time that was originally defined for a task. The task state determines which of these times you can reschedule, cancel, and start at run time, and when these actions can be taken. You can use Business Process Choreographer Explorer to change these times, or you can use the update method of the Human Task Manager API to modify the appropriate task property.

You can change the due time, expiration time, or deletion time of a task in one of the following ways:

For a chain of tasks, each task in the chain has its own due time. However, only the first task in the chain has an expiration time and this is shared by all of the other tasks in the chain. Subtasks have their own due time and expiration time. If deletion is supported for the task kind, you can change the deletion time.


Due time

You can use the dueTime and the durationUntilDue properties to change the due time of a task. The task state determines which of these properties you can use.

Inactive state

In this state, you can override the duration until due value that was defined for the task by setting the durationUntilDue property to a valid value for the calendar that is used by the task, or to one of the constant values. To specify that the task becomes due immediately after it starts, for example, because the task has a high priority, set the durationUntilDue property to DURATION_ZERO. To prevent the task from becoming due, set the durationUntilDue property to DURATION_INFINITE.

An active state (ready, claimed, running, or forwarded)

If the task is in any of these states, you can reschedule or cancel the due time. In addition, if the task does not have a due time, for example, because DURATION_INFINITE was set while the task was inactive, you can set a due time.

You can set a due time or reschedule it by setting either the dueTime property or the durationUntilDue property to a valid value for the calendar that is used by the task. To cancel the due time, set the durationUntilDue property to DURATION_INFINITE. To force the task to become due immediately, for example, because it is associated with an urgent customer request, set the durationUntilDue property to DURATION_ZERO.


Expiration time

You can use the expirationTime and the durationUntilExpires properties to change the expiration time of a task. The task state determines which of these properties you can use.

Inactive state

In this state, you can override the duration until expires value that was defined for the task by setting the durationUntilExpires property to a valid value for the calendar that is used by the task, or to one of the constant values. To specify that the task expires immediately after it starts, set the durationUntilExpires property to DURATION_ZERO. To prevent the task from expiring, set the durationUntilExpires property to DURATION_INFINITE.

An active state (ready, claimed, running, or forwarded)

If the task is in any of these states, you can reschedule or cancel the expiration time. In addition, if the task does not have an expiration time, for example, because DURATION_INFINITE was set while the task was inactive, you can set an expiration time.

You can set an expiration time or reschedule it by setting either the expirationTime property or the durationUntilExpires property to a valid value for the calendar used by the task. To cancel the expiration time, set the durationUntilExpires property to DURATION_INFINITE. To force the task to expire immediately, for example, because it is no longer required, set the durationUntilExpires property to DURATION_ZERO.


Deletion time

The auto delete setting of the task and the task end state determine whether a task is deleted when the deletion time is reached. You can use the deletionTime and the durationUntilDeleted properties to change the deletion time of a task. The task state determines which of these properties you can use.

Inactive state or an active state (ready, claimed, running, or forwarded)

If the task is in any of these states, you can override the duration until deleted value that was defined for the task by setting the durationUntilDeleted property to one of the constant values. You can delete the task immediately after it reaches one of the end states by setting the durationUntilDeleted property to DURATION_ZERO. To cancel the deletion time, set the durationUntilDeleted property to DURATION_INFINITE.

An end state (finished, failed, forwarded, terminated, or expired)

If the task is in any of these states, you can reschedule or cancel the deletion time. In addition, if the task does not have a deletion time, for example, because DURATION_INFINITE was set while the task was inactive, you can set a deletion time.

You can set a deletion time or reschedule it by setting either the deletionTime property or the durationUntilDeleted property to a valid value for the calendar used by the task. To cancel the deletion time, set the durationUntilDeleted property to DURATION_INFINITE. To force the task to be deleted immediately, set the durationUntilDeleted property to DURATION_ZERO.

Modification of task instance properties at run time


Related information:
Rescheduling task instances