Monday, July 30, 2007

How to Get Single Employee with Multiple Rules in WorkFlow

Use Following Query to Get Multiple Rules Attached to a Single Employee
Connect to instance By Using APPS User Name

SELECT orig_system, description, orig_system_id, NAME "Login Name",
display_name "Employee Name"
FROM wf_local_roles wfr1
WHERE (wfr1.orig_system <> 'WF_LOCAL_ROLES' AND wfr1.orig_system_id <> 0)
AND EXISTS (
SELECT 'row found'
FROM wf_local_roles wfr2
WHERE ( wfr2.orig_system <> 'WF_LOCAL_ROLES'
AND wfr2.orig_system_id <> 0
)
AND wfr2.orig_system_id = wfr1.orig_system_id
AND wfr2.orig_system = wfr1.orig_system
AND wfr2.NAME <> wfr1.NAME)
ORDER BY orig_system