7.7 COMPLETE_TASK Procedure
This procedure completes a task with an outcome. Only the actual owner or a potential owner of the task can invoke this procedure.
Tasks in Assigned state might be completed with an outcome. This operation transitions the Task from Assigned state to Completed state and sets the outcome of the task. Once a Task is in Completed state, it is subject for purging and archival.
Syntax
APEX_APPROVAL.COMPLETE_TASK (
p_task_id IN NUMBER,
p_outcome IN t_task_outcome,
p_autoclaim IN BOOLEAN DEFAULT FALSE );Parameters
Table 7-6 COMPLETE_TASK Parameters
| Parameter | Description |
|---|---|
p_task_id |
The Task ID. |
p_outcome |
The outcome of the Task. |
p_autoclaim |
If Task is in state UNASSIGNED then claim the task implicitly.
|
State Handling
Pre-State: ASSIGNED|UNASSIGNED (p_autoclaim=true)
Post-State: COMPLETED
Example
BEGIN
apex_approval.complete_task(
p_task_id => 1234,
p_outcome => apex_approval.c_task_outcome_approved
);
END;Parent topic: APEX_APPROVAL