9.8 COMPLETE_TASK Procedure
Caution:
This API is deprecated and will be removed in a future release.
Use APEX_HUMAN_TASK instead.
This procedure completes a task. For Approval Tasks, an outcome must be supplied (Approved or Rejected). Action Tasks do not have 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 DEFAULT NULL,
p_autoclaim IN BOOLEAN DEFAULT FALSE );Parameters
| Parameter | Description |
|---|---|
p_task_id |
The Task ID. |
p_outcome |
The outcome of the Task for Approval Tasks. |
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 (Deprecated)