DBA Data[Home] [Help]

APPS.WF_PURGE dependencies on WF_LOCAL_ROLES

Line 1504: from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local

1500: --
1501: --Bug 16054955. This cursor is to purge ad-hoc USERS and related data
1502: cursor user_cursor is
1503: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1504: from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local
1505: where ORIG_SYSTEM = 'WF_LOCAL_USERS'
1506: and EXPIRATION_DATE <= end_date
1507: and local.USER_FLAG='Y'
1508: and not exists

Line 1517: from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local

1513:
1514: --Bug 16054955. This cursor is to purge ad-hoc ROLES and related data
1515: cursor role_cursor is
1516: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1517: from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local
1518: where ORIG_SYSTEM = 'WF_LOCAL_ROLES'
1519: and EXPIRATION_DATE <= end_date
1520: and local.USER_FLAG='N'
1521: and not exists

Line 1518: where ORIG_SYSTEM = 'WF_LOCAL_ROLES'

1514: --Bug 16054955. This cursor is to purge ad-hoc ROLES and related data
1515: cursor role_cursor is
1516: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1517: from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local
1518: where ORIG_SYSTEM = 'WF_LOCAL_ROLES'
1519: and EXPIRATION_DATE <= end_date
1520: and local.USER_FLAG='N'
1521: and not exists
1522: (select NULL

Line 1532: -- Similar to role_cursor for orig systems different from WF_LOCAL_ROLES

1528: from WF_NOTIFICATIONS wn
1529: where wn.RECIPIENT_ROLE = local.NAME
1530: or wn.ORIGINAL_RECIPIENT = local.NAME);
1531:
1532: -- Similar to role_cursor for orig systems different from WF_LOCAL_ROLES
1533: cursor role_orig_system_cursor (p_OrigSystem varchar2,
1534: p_endDate date) is
1535: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1536: from WF_LOCAL_ROLES local

Line 1536: from WF_LOCAL_ROLES local

1532: -- Similar to role_cursor for orig systems different from WF_LOCAL_ROLES
1533: cursor role_orig_system_cursor (p_OrigSystem varchar2,
1534: p_endDate date) is
1535: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1536: from WF_LOCAL_ROLES local
1537: where ORIG_SYSTEM = p_origSystem
1538: and (p_endDate is NULL or EXPIRATION_DATE <= p_endDate)
1539: and local.USER_FLAG='N'
1540: and not exists

Line 1555: from WF_LOCAL_ROLES local

1551: -- Similar to user_cursor for orig systems different from WF_LOCAL_USERS
1552: cursor user_orig_system_cursor (p_OrigSystem varchar2,
1553: p_endDate date) is
1554: select local.NAME, local.ORIG_SYSTEM, local.ORIG_SYSTEM_ID
1555: from WF_LOCAL_ROLES local
1556: where ORIG_SYSTEM = p_origSystem
1557: and (p_endDate is NULL or EXPIRATION_DATE <= p_endDate)
1558: and local.USER_FLAG='Y'
1559: and not exists

Line 1579: from WF_LOCAL_USER_ROLES PARTITION (WF_LOCAL_ROLES) WLUR

1575: -- of whether the role is expired or not.
1576: cursor expired_rel_cursor is
1577: select wlur.user_name, wlur.user_orig_system, wlur.user_orig_system_id,
1578: wlur.role_name, wlur.role_orig_system, wlur.role_orig_system_id
1579: from WF_LOCAL_USER_ROLES PARTITION (WF_LOCAL_ROLES) WLUR
1580: where (WLUR.ROLE_ORIG_SYSTEM='WF_LOCAL_ROLES' or WLUR.USER_ORIG_SYSTEM='WF_LOCAL_USERS')
1581: and WLUR.EFFECTIVE_END_DATE <= directory.end_date;
1582:
1583: cursor expired_rel_orig_system_cursor (p_origSystem varchar2,

Line 1580: where (WLUR.ROLE_ORIG_SYSTEM='WF_LOCAL_ROLES' or WLUR.USER_ORIG_SYSTEM='WF_LOCAL_USERS')

1576: cursor expired_rel_cursor is
1577: select wlur.user_name, wlur.user_orig_system, wlur.user_orig_system_id,
1578: wlur.role_name, wlur.role_orig_system, wlur.role_orig_system_id
1579: from WF_LOCAL_USER_ROLES PARTITION (WF_LOCAL_ROLES) WLUR
1580: where (WLUR.ROLE_ORIG_SYSTEM='WF_LOCAL_ROLES' or WLUR.USER_ORIG_SYSTEM='WF_LOCAL_USERS')
1581: and WLUR.EFFECTIVE_END_DATE <= directory.end_date;
1582:
1583: cursor expired_rel_orig_system_cursor (p_origSystem varchar2,
1584: p_endDate date) is

Line 1587: from WF_LOCAL_USER_ROLES WLUR, WF_LOCAL_ROLES WLR

1583: cursor expired_rel_orig_system_cursor (p_origSystem varchar2,
1584: p_endDate date) is
1585: select wlur.user_name, wlur.user_orig_system, wlur.user_orig_system_id,
1586: wlur.role_name, wlur.role_orig_system, wlur.role_orig_system_id
1587: from WF_LOCAL_USER_ROLES WLUR, WF_LOCAL_ROLES WLR
1588: where WLR.ORIG_SYSTEM=p_origSystem
1589: and ((WLR.NAME=WLUR.USER_NAME and WLR.ORIG_SYSTEM=WLUR.USER_ORIG_SYSTEM)
1590: or
1591: (WLR.NAME=WLUR.ROLE_NAME and WLR.ORIG_SYSTEM=WLUR.ROLE_ORIG_SYSTEM))

Line 1595: type roleRec is record (NAME WF_LOCAL_ROLES.NAME%type,

1591: (WLR.NAME=WLUR.ROLE_NAME and WLR.ORIG_SYSTEM=WLUR.ROLE_ORIG_SYSTEM))
1592: and WLUR.PARTITION_ID = 0
1593: and WLUR.EFFECTIVE_END_DATE <= p_endDate;
1594:
1595: type roleRec is record (NAME WF_LOCAL_ROLES.NAME%type,
1596: ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;

Line 1596: ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,

1592: and WLUR.PARTITION_ID = 0
1593: and WLUR.EFFECTIVE_END_DATE <= p_endDate;
1594:
1595: type roleRec is record (NAME WF_LOCAL_ROLES.NAME%type,
1596: ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,

Line 1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);

1593: and WLUR.EFFECTIVE_END_DATE <= p_endDate;
1594:
1595: type roleRec is record (NAME WF_LOCAL_ROLES.NAME%type,
1596: ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,

Line 1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,

1596: ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,

Line 1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,

1597: ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);

Line 1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,

1598: type roleTabType is table of roleRec index by binary_integer;
1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1606: type expRoleTabType is table of expRoleRec index by binary_integer;

Line 1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,

1599: roleTab roleTabType;
1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1606: type expRoleTabType is table of expRoleRec index by binary_integer;
1607: expRoleTab expRoleTabType;

Line 1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,

1600: type expRoleRec is record (USER_NAME WF_LOCAL_ROLES.NAME%type,
1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1606: type expRoleTabType is table of expRoleRec index by binary_integer;
1607: expRoleTab expRoleTabType;
1608: l_commit boolean := false;

Line 1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);

1601: USER_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1602: USER_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type,
1603: ROLE_NAME WF_LOCAL_ROLES.NAME%type,
1604: ROLE_ORIG_SYSTEM WF_LOCAL_ROLES.ORIG_SYSTEM%type,
1605: ROLE_ORIG_SYSTEM_ID WF_LOCAL_ROLES.ORIG_SYSTEM_ID%type);
1606: type expRoleTabType is table of expRoleRec index by binary_integer;
1607: expRoleTab expRoleTabType;
1608: l_commit boolean := false;
1609:

Line 1629: -- Delete rows in wf_local_user_roles by role_name and wf_local_roles

1625: --removed from the local partition either by end_date, or remove all with
1626: --a null end-date (providing there are no active notifications or items).
1627: --
1628: -- Purge Roles
1629: -- Delete rows in wf_local_user_roles by role_name and wf_local_roles
1630: -- by name as determined
1631: open role_orig_system_cursor(orig_system, end_date);
1632: loop
1633: fetch role_orig_system_cursor bulk collect into roleTab LIMIT wf_purge.commit_frequency;

Line 1646: delete from WF_LOCAL_ROLES local

1642: where local.ROLE_NAME = roleTab(idx).name
1643: and local.ROLE_ORIG_SYSTEM = roleTab(idx).orig_system
1644: and local.ROLE_ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1645: --Remove the role
1646: delete from WF_LOCAL_ROLES local
1647: where local.NAME = roleTab(idx).name
1648: and local.ORIG_SYSTEM = roleTab(idx).orig_system
1649: and local.ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1650: end loop;

Line 1671: delete from WF_LOCAL_ROLES local

1667: where local.USER_NAME = roleTab(idx).name
1668: and local.USER_ORIG_SYSTEM = roleTab(idx).orig_system
1669: and local.USER_ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1670: --Remove the role
1671: delete from WF_LOCAL_ROLES local
1672: where local.NAME = roleTab(idx).name
1673: and local.ORIG_SYSTEM = roleTab(idx).orig_system
1674: and local.ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1675: end loop;

Line 1712: -- Delete rows in wf_local_user_roles by role_name and wf_local_roles

1708: close expired_rel_orig_system_cursor;
1709: elsif (end_date is not null) then
1710: --
1711: -- Purge Roles
1712: -- Delete rows in wf_local_user_roles by role_name and wf_local_roles
1713: -- by name as determined
1714: open role_cursor;
1715: loop
1716: fetch role_cursor bulk collect into roleTab limit WF_PURGE.COMMIT_FREQUENCY;

Line 1728: delete from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local

1724: delete from WF_USER_ROLE_ASSIGNMENTS local
1725: where local.ROLE_NAME = roleTab(idx).name
1726: and local.ROLE_ORIG_SYSTEM = roleTab(idx).orig_system
1727: and local.ROLE_ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1728: delete from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local
1729: where local.NAME = roleTab(idx).name
1730: and local.ORIG_SYSTEM = roleTab(idx).orig_system
1731: and local.ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1732: end loop;

Line 1753: delete from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local

1749: where local.USER_NAME = roleTab(idx).name
1750: and local.USER_ORIG_SYSTEM = roleTab(idx).orig_system
1751: and local.USER_ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1752:
1753: delete from WF_LOCAL_ROLES PARTITION(WF_LOCAL_ROLES) local
1754: where local.NAME = roleTab(idx).name
1755: and local.ORIG_SYSTEM = roleTab(idx).orig_system
1756: and local.ORIG_SYSTEM_ID = roleTab(idx).orig_system_id;
1757: end loop;