7.14 GET_TASK_HISTORY Function

This function gets the approval log for a task.

This function only returns data in the context of a valid Oracle APEX session. It returns no data in SQL Workshop.

Syntax

APEX_APPROVAL.GET_TASK_HISTORY (
    p_task_id        IN NUMBER,
    p_include_all    IN VARCHAR2 DEFAULT 'N' )
RETURN apex_t_approval_log_table pipelined;

Parameters

Table 7-8 GET_TASK_HISTORY Parameters

Parameter Description
p_task_id The task ID.
p_include_all If set to Y, the history of all tasks linked to the task with the given task ID is shown. Since Oracle APEX release 22.2, this includes prior Tasks that have been expired.

Returns

A table of approval log entries (type apex_t_approval_log_table) containing the following columns:

  • display_msg varchar2(4000)
  • event_creator varchar2(255)
  • event_creator_lower varchar2(255)
  • event_timestamp timestamp with time zone
  • event_type varchar2(255)
  • event_type_code varchar2(32)
  • new_actual_owner varchar2(255)
  • new_actual_owner_lower varchar2(255)
  • new_priority number
  • new_priority_level varchar2(255)
  • new_state varchar2(255)
  • new_state_code varchar2(32)
  • old_actual_owner varchar2(255)
  • old_actual_owner_lower varchar2(255)
  • old_priority number
  • old_priority_level varchar2(255)
  • old_state varchar2(255)
  • old_state_code varchar2(32)
  • outcome varchar2(255)
  • outcome_code varchar2(32)

Example

select *  from table ( apex_approval.get_task_history ( p_task_id => 1234,
                                                 p_include_all => 'Y' ) )