SELECT TO_CHAR(ias.begin_date,'DD-MON-RR HH24:MI:SS') begin_date
,TO_CHAR(ias.end_date,'DD-MON-RR HH24:MI:SS') end_date
,ap.display_name||'/'||pa.instance_label activity
,ias.activity_status activity_status
,ias.activity_result_code result
,ias.assigned_user assigned_user
,ias.notification_id notification_id
,ntf.status status
,ias.action
,ias.performed_by
,ias.due_date
,ias.error_name
,ias.error_message
from apps.wf_item_activity_statuses ias
,apps.wf_process_activities pa
,apps.wf_activities ac
,apps.wf_activities_vl ap
,apps.wf_items i
,apps.wf_notifications ntf
WHERE ias.process_activity = pa.instance_id
AND pa.activity_name = ac.name
AND pa.activity_item_type = ac.item_type
AND pa.process_name = ap.name
AND pa.process_item_type = ap.item_type
AND pa.process_version = ap.version
AND i.item_type = ias.item_type
AND i.item_key = ias.item_key
AND i.begin_date >= ac.begin_date
AND i.begin_date < NVL(ac.end_date, i.begin_date+1)
AND ntf.notification_id(+) = ias.notification_id
AND language = USERENV('LANG')
AND ias.item_type = <<XX_ITEM_TYPE>>
AND ias.item_key = <<XX_ITEM_KEY>>
No comments:
Post a Comment