SELECT DISTINCT
itm.item_type item_type,
itm.item_key item_key,
PRA.PROCESS_NAME || ':' || PRA.INSTANCE_LABEL
ERROR_PROCESS_ACTIVITY_LABEL,
WF_ENGINE.GetItemAttrText ('WFERROR', itm.item_key, 'ERROR_ITEM_TYPE')
errant_item_type,
WF_ENGINE.GetItemAttrText ('WFERROR', itm.item_key, 'ERROR_ITEM_KEY')
errant_item_key
FROM wf_items itm,
wf_item_activity_statuses sta,
wf_item_activity_statuses errsta,
wf_process_activities pra
WHERE itm.item_type = 'WFERROR'
AND itm.end_date IS NULL
AND TO_NUMBER (
WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ACTIVITY_ID')) =
sta.process_activity
AND WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ITEM_TYPE') = sta.item_type(+)
AND WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ITEM_KEY') = sta.item_key(+)
AND sta.activity_status(+) <> 'ERROR'
AND errsta.item_type = itm.item_type
AND errsta.item_key = itm.item_key
AND errsta.end_date IS NULL
AND errsta.notification_id IS NOT NULL
AND errsta.process_activity = pra.instance_id;
itm.item_type item_type,
itm.item_key item_key,
PRA.PROCESS_NAME || ':' || PRA.INSTANCE_LABEL
ERROR_PROCESS_ACTIVITY_LABEL,
WF_ENGINE.GetItemAttrText ('WFERROR', itm.item_key, 'ERROR_ITEM_TYPE')
errant_item_type,
WF_ENGINE.GetItemAttrText ('WFERROR', itm.item_key, 'ERROR_ITEM_KEY')
errant_item_key
FROM wf_items itm,
wf_item_activity_statuses sta,
wf_item_activity_statuses errsta,
wf_process_activities pra
WHERE itm.item_type = 'WFERROR'
AND itm.end_date IS NULL
AND TO_NUMBER (
WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ACTIVITY_ID')) =
sta.process_activity
AND WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ITEM_TYPE') = sta.item_type(+)
AND WF_ENGINE.GetItemAttrText ('WFERROR',
itm.item_key,
'ERROR_ITEM_KEY') = sta.item_key(+)
AND sta.activity_status(+) <> 'ERROR'
AND errsta.item_type = itm.item_type
AND errsta.item_key = itm.item_key
AND errsta.end_date IS NULL
AND errsta.notification_id IS NOT NULL
AND errsta.process_activity = pra.instance_id;
No comments:
Post a Comment