7.5 CANCEL_TASK Procedure
This procedure cancels the task by setting the task to state CANCELED. Only the initiator or the Business Administrator of the task can invoke this procedure. Only tasks which are not in COMPLETED or ERRORED state can be CANCELED.
Canceling a task is useful when an approval is no longer required. For example, consider a travel approval for a business trip, and the person requesting the approval suddenly cannot make the trip, and the Task may be canceled.
Syntax
APEX_APPROVAL.CANCEL_TASK (
p_task_id IN NUMBER );Parameters
| Parameter | Description |
|---|---|
p_task_id |
The Task ID. |
State Handling
Pre-State: Any
Post-State: CANCELED
Example
BEGIN
apex_approval.cancel_task(
p_task_id => 1234
);
END;Parent topic: APEX_APPROVAL