25.1.9.1.6.2 Showing Only Current Application Tasks

Limit a Unified Task List page to tasks from the current application.

By default, the task list displays tasks from all applications in the workspace. If instead you want it to only display tasks related to the current application, one small change is required. As shown below, the Content Row region's query retrieves the task list from the GET_TASKS function in the APEX_HUMAN_TASK package. This function returns a table of task information records. By using the table() operator, this result works just like a regular table in a SELECT statement.

Notice that the p_application_id parameter is commented out using two consecutive dashes (--), the PL/SQL line comment.

select task_id,
       task_type,
         ⋮
       badge_state
  from table ( apex_human_task.get_tasks (
                   p_context            => 'MY_TASKS',
                   p_show_expired_tasks => :P33_SHOW_EXPIRED
                   --, p_application_id => :APP_ID
                   ) )

To only display tasks related to the current application, as shown below, simply remove the two dashes to uncomment the p_application_id parameter line. This passes the current application id as the value of this parameter, and limits tasks returned to those from the current application only.

select task_id,
       task_type,
         ⋮
       badge_state
  from table ( apex_human_task.get_tasks (
                   p_context            => 'MY_TASKS',
                   p_show_expired_tasks => :P33_SHOW_EXPIRED
                   , p_application_id => :APP_ID
                   ) )