8.28 RENEW_TASK Function

This function reactivates Expired or Errored Tasks. Tasks that have been transitioned to state EXPIRED or ERRORED can be renewed by a Business Administrator.

When a Business Administrator renews a Task, a new Task is created with the given information from the given Task ID. The renewed task is associated with the Expired/Errored Task so that users can review the origin of the Task. This function returns the ID of the renewed task.

Syntax

APEX_APPROVAL.RENEW_TASK (
    p_task_id       IN NUMBER,
    p_priority      IN INTEGER  DEFAULT NULL,
    p_due_date      IN timestamp with time zone )
RETURN NUMBER;

Parameters

Parameter Description
p_task_id The Task ID.
p_priority The priority of the renewed Task.
p_due_date The due date for the renewed Task.

Returns

This function returns the ID of the renewed task.

State Handling

State of original Task: EXPIRED, ERRORED

State of renewed Task: ASSIGNED, UNASSIGNED

Example

BEGIN
    apex_approval.renew_task(
        p_task_id            => 1234,
        p_priority           => apex_approval.c_task_priority_high,
        p_due_date           => sysdate + 10
    );
END;