Tuesday, May 4, 2021

Useful workflow queries - Check notification status

Query to Check Notification Status:

select  wn.notification_id nid,

        wn.from_user,

        wn.to_user,

        wn.subject,

        wn.context,

        wn.group_id,

        wn.status,

        wn.mail_status,

        wn.message_type,

        wn.message_name,

        wn.access_key,

        wn.priority,

        wn.begin_date,

        wn.end_date,

        wn.due_date,

        wn.callback,

        wn.recipient_role,

        wn.responder,

        wn.original_recipient

from    apps.wf_notifications wn, wf_item_activity_statuses wias

where  wn.group_id = wias.notification_id

and  wias.item_type =  'OEAME'

and  wias.item_key in  ('318056','318055');

 

Query to Check Item Keys:

SELECT item_type,

       item_key,

       to_char(begin_date,

               'DD-MON-RR HH24:MI:SS') begin_date,

       to_char(end_date,

               'DD-MON-RR HH24:MI:SS') end_date,

       root_activity activity

  FROM wf_items

WHERE parent_item_type = 'OENH'

   AND end_date IS NULL

   and parent_item_key= '2882004'

ORDER BY to_date(begin_date, ‘DD-MON-YYYY hh24:mi:ss') DESC;