SELECT TO_CHAR(WIAS.BEGIN_DATE, 'DD-MON-RR HH24:MI:SS') BEGIN_DATE,
TO_CHAR(WIAS.END_DATE, 'DD-MON-RR HH24:MI:SS') END_DATE,
WAP.NAME || '/' || WPA.INSTANCE_LABEL ACTIVITY,
WIAS.ACTIVITY_STATUS STATUS,
WIAS.ACTIVITY_RESULT_CODE RESULT,
WIAS.ASSIGNED_USER ASSIGNED_USER,
WIAS.NOTIFICATION_ID "Notification Id",
WN.STATUS "Status",
WIAS.ACTION,
WIAS.PERFORMED_BY
FROM WF_ITEM_ACTIVITY_STATUSES WIAS,
WF_PROCESS_ACTIVITIES WPA,
WF_ACTIVITIES WAC,
WF_ACTIVITIES WAP,
WF_ITEMS WI,
WF_NOTIFICATIONS WN
WHERE WIAS.ITEM_TYPE = '&item_type' AND WIAS.ITEM_KEY = '&item_key' AND
WI.ITEM_TYPE = '&item_type' AND
WI.ITEM_KEY = WIAS.ITEM_KEY AND WI.BEGIN_DATE >= WAC.BEGIN_DATE AND
WI.BEGIN_DATE < NVL(WAC.END_DATE, WI.BEGIN_DATE + 1) AND
WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID AND
WPA.ACTIVITY_NAME = WAC.NAME AND
WPA.ACTIVITY_ITEM_TYPE = WAC.ITEM_TYPE AND
WPA.PROCESS_NAME = WAP.NAME AND
WPA.PROCESS_ITEM_TYPE = WAP.ITEM_TYPE AND
WPA.PROCESS_VERSION = WAP.VERSION AND AND
WN.NOTIFICATION_ID(+) = WIAS.NOTIFICATION_ID
ORDER BY WIAS.BEGIN_DATE, WIAS.EXECUTION_TIME
|
No comments:
Post a Comment