25.1.9.1.6.4 Limiting Which Types of Tasks Appear

Add a WHERE clause to show only selected task definition types.

In a new Unified Task List page, the Content Row region's query contains no WHERE clause. The user can use the Smart Filters region at runtime to narrow the list, but sometimes you may want to limit which tasks show up in the list at all. The table() operator wrapping the GET_TASKS function call lets its results participate in the query like a regular table. So, just add a WHERE clause to the query to filter the list. For example, as shown below, to show only tasks based on two specific task definition types you can add a WHERE clause that filters on the TASK_DEF_STATIC_ID column.

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
                   ) )
 where task_def_static_id in ('NEW_PATIENT','PURCHASE_OFFICE_SUPPLIES')