
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.
- Using a specific time
- Using a duration, for example, 2 days, based on a calendar, such
as a business calendar. You can also use the following constants in
duration expressions:
- DURATION_ZERO
- The task becomes due or it expires immediately after it starts, or it is deleted immediately after it completes (depending on the auto delete setting of the task and the task end state). If the task has started, it becomes due immediately, or it expires immediately. If the task is in an end state, it is deleted immediately if auto deletion is set for the task.
- DURATION_INFINITE
- The task does not become due, it does not expire, or it is not deleted.
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
- 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
- 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
- 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.