DBA Data[Home] [Help]

APPS.WF_MAINTENANCE dependencies on WF_USER_ROLE_ASSIGNMENTS

Line 660: -- As part of fix 9184359. Scan table WF_USER_ROLE_ASSIGNMENTS for rows with

656:
657: END PerformCommit;
658:
659: -- Procedure FixWURAEffectiveDates (private)
660: -- As part of fix 9184359. Scan table WF_USER_ROLE_ASSIGNMENTS for rows with
661: -- null effective start/end dates and will set them according the the
662: -- values of the other date columns
663: -- IN: No p_maxRows. This parameter comes from main procedure ValidateUserRoles
664: --

Line 690: from WF_USER_ROLE_ASSIGNMENTS WURA

686: cursor c_nullEffectiveDates is
687: select ROWID, start_date, end_date, user_start_date, user_end_date,
688: role_start_date, role_end_date,
689: assigning_role_start_date, assigning_role_end_date, null, null
690: from WF_USER_ROLE_ASSIGNMENTS WURA
691: where (WURA.USER_NAME = p_username or p_username is null)
692: and (WURA.ROLE_NAME = p_rolename or p_rolename is null)
693: and (WURA.EFFECTIVE_START_DATE is null
694: or WURA.EFFECTIVE_END_DATE is null);

Line 720: update WF_USER_ROLE_ASSIGNMENTS WURA

716: l_e_end_dateTab(i));
717: end loop;
718: begin
719: forall j in l_rowidTab.FIRST.. l_rowidTab.LAST
720: update WF_USER_ROLE_ASSIGNMENTS WURA
721: set WURA.EFFECTIVE_START_DATE=l_e_start_dateTab(j),
722: WURA.EFFECTIVE_END_DATE =l_e_end_dateTab(j)
723: where WURA.ROWID=l_rowidTab(j);
724: exception

Line 769: from wf_user_role_assignments group by user_name, role_name) ura

765: ura.effective_start_date,ura.effective_end_date
766: from wf_local_user_roles lur,
767: (select user_name, role_name, min(effective_start_date) effective_start_date,
768: max (effective_end_date) effective_end_date
769: from wf_user_role_assignments group by user_name, role_name) ura
770: where ura.user_name = lur.user_name
771: and ura.role_name = lur.role_name
772: and (URA.USER_NAME=p_username or p_username is null)
773: and (URA.ROLE_NAME=p_rolename or p_rolename is null)

Line 911: -- Missing records in WF_USER_ROLE_ASSIGNMENTS

907: -- cursor named %2 used when only username is provided
908: -- cursor named %3 used when only rolename is provided
909: -- cursor named %4 used when none are provided
910:
911: -- Missing records in WF_USER_ROLE_ASSIGNMENTS
912: -- Using same cursor parameter names as Procedures' param names.
913: cursor c_missing_user_role_asg(p_username varchar2, p_rolename varchar2 ) is
914: select user_name, role_name, -1, start_date, expiration_date,
915: created_by, creation_date, last_updated_by, last_update_date,

Line 925: from wf_user_role_assignments wura

921: from wf_local_user_roles wur
922: where (p_username IS NULL OR wur.user_name=p_username)
923: and (p_rolename IS NULL OR wur.role_name=p_rolename)
924: and not exists (select null
925: from wf_user_role_assignments wura
926: where wura.user_name = wur.user_name
927: and wura.role_name = wur.role_name
928: and (p_username is null OR wura.user_name = p_username)
929: and (p_rolename is null or wura.role_name = p_rolename)

Line 986: wf_user_role_assignments partition (FND_USR) wura

982: select wura.rowid, wur.rowid, wu.start_date, wu.expiration_date,
983: wu.orig_system, wu.orig_system_id
984: from wf_local_user_roles partition (FND_USR) wur,
985: wf_local_roles partition (FND_USR) wu,
986: wf_user_role_assignments partition (FND_USR) wura
987: --Equi-joins to select the proper relationships between the tables
988: where (p_username is null OR wura.user_name = p_username)
989: and wura.partition_id = wu.partition_id
990: and wura.partition_id = wu.partition_id

Line 1074: from wf_user_role_assignments

1070:
1071: -- Same from user_role_assignments
1072: CURSOR dangling_URA_refs (p_username varchar2, p_rolename varchar2) is
1073: select rowid
1074: from wf_user_role_assignments
1075: where (p_username IS NULL OR user_name = p_username )
1076: and (p_rolename IS NULL OR role_name = p_rolename )
1077: -- Either user name or role name NOT in wf_local_roles
1078: and (user_name not in (select name from wf_local_roles

Line 1152: DELETE from WF_USER_ROLE_ASSIGNMENTS

1148: close dangling_URA_refs;
1149:
1150: if (l_rowIDTAB.COUNT > 0) then
1151: forall i in l_rowIDTAB.FIRST..l_rowIDTAB.LAST
1152: DELETE from WF_USER_ROLE_ASSIGNMENTS
1153: WHERE rowid = l_rowIDTAB(i);
1154: commit;
1155: end if;
1156:

Line 1197: insert into WF_USER_ROLE_ASSIGNMENTS (USER_NAME,

1193: if (l_userSrcTAB.COUNT > 0) then
1194: begin
1195: forall i in l_userSrcTAB.FIRST..l_userSrcTAB.LAST save exceptions
1196:
1197: insert into WF_USER_ROLE_ASSIGNMENTS (USER_NAME,
1198: ROLE_NAME, RELATIONSHIP_ID, ASSIGNING_ROLE, START_DATE,
1199: END_DATE, CREATED_BY, CREATION_DATE, LAST_UPDATED_BY,
1200: LAST_UPDATE_DATE, LAST_UPDATE_LOGIN, USER_START_DATE,
1201: ROLE_START_DATE, ASSIGNING_ROLE_START_DATE, USER_END_DATE,

Line 1356: --wf_user_role_Assignments and wf_local_user_Roles.

1352: raise;
1353: end; --End of duplicate/invalid FND_USR/PER correction in WF_LOCAL_USER_ROLES.
1354:
1355: --Next, we correct the corrupt self-reference records in
1356: --wf_user_role_Assignments and wf_local_user_Roles.
1357: begin
1358: <>
1359: loop
1360: --We will commit on each loop cycle to prevent fetch across commits, we will

Line 1386: update WF_USER_ROLE_ASSIGNMENTS

1382: --We can then issue the bulk update.
1383: begin
1384: if (p_UpdateWho is not null and p_UpdateWho) then
1385: forall tabIndex in l_rowIDTAB.FIRST..l_rowIDTAB.LAST save exceptions
1386: update WF_USER_ROLE_ASSIGNMENTS
1387: set ROLE_START_DATE = l_StartSrcTAB(tabIndex),
1388: ROLE_END_DATE = l_EndSrcTAB(tabIndex),
1389: USER_START_DATE = l_StartSrcTAB(tabIndex),
1390: USER_END_DATE = l_EndSrcTAB(tabIndex),

Line 1409: update WF_USER_ROLE_ASSIGNMENTS

1405: LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID
1406: where rowid = l_rowIDTAB(tabIndex);
1407: else --donot touch the WHO columns. This is default behavior
1408: forall tabIndex in l_rowIDTAB.FIRST..l_rowIDTAB.LAST save exceptions
1409: update WF_USER_ROLE_ASSIGNMENTS
1410: set ROLE_START_DATE = l_StartSrcTAB(tabIndex),
1411: ROLE_END_DATE = l_EndSrcTAB(tabIndex),
1412: USER_START_DATE = l_StartSrcTAB(tabIndex),
1413: USER_END_DATE = l_EndSrcTAB(tabIndex),

Line 1434: delete from wf_user_role_assignments

1430: for j in 1..sql%bulk_exceptions.count loop
1431: if (sql%bulk_exceptions(j).ERROR_CODE = 1) then
1432: --If update violates dup_val_on_index, we can simply delete.
1433: l_eIndex := sql%bulk_exceptions(j).ERROR_INDEX;
1434: delete from wf_user_role_assignments
1435: where rowid = l_rowIDTAB(l_eIndex);
1436: else
1437: raise;
1438: end if;

Line 1569: WF_USER_ROLE_ASSIGNMENTS WURA,

1565: NVL(WURA.ASSIGNING_ROLE_END_DATE,
1566: TO_DATE(''9999/01/01'', ''YYYY/MM/DD''))) EFFECTIVE_END_DATE,
1567: WURA.RELATIONSHIP_ID
1568: FROM
1569: WF_USER_ROLE_ASSIGNMENTS WURA,
1570: WF_LOCAL_USER_ROLES WUR ,
1571: WF_LOCAL_ROLES WAR,
1572: WF_LOCAL_ROLES WU,
1573: WF_LOCAL_ROLES WR

Line 1689: update WF_USER_ROLE_ASSIGNMENTS

1685: --all of the start/end dates and calculated effective start/end dates
1686: --We can then issue the bulk update..
1687: if (p_UpdateWho is not null and p_UpdateWho) then
1688: forall tabIndex in l_rowIDTAB.FIRST..l_rowIDTAB.LAST
1689: update WF_USER_ROLE_ASSIGNMENTS
1690: set ROLE_START_DATE = l_roleStartSrcTAB(tabIndex),
1691: ROLE_END_DATE = l_roleEndSrcTAB(tabIndex),
1692: USER_START_DATE = l_userStartSrcTAB(tabIndex),
1693: USER_END_DATE = l_userEndSrcTAB(tabIndex),

Line 1710: update WF_USER_ROLE_ASSIGNMENTS

1706: LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID
1707: where rowid = l_rowIDTAB(tabIndex);
1708: else --Donot touch WHO columns. This is default behavior
1709: forall tabIndex in l_rowIDTAB.FIRST..l_rowIDTAB.LAST
1710: update WF_USER_ROLE_ASSIGNMENTS
1711: set ROLE_START_DATE = l_roleStartSrcTAB(tabIndex),
1712: ROLE_END_DATE = l_roleEndSrcTAB(tabIndex),
1713: USER_START_DATE = l_userStartSrcTAB(tabIndex),
1714: USER_END_DATE = l_userEndSrcTAB(tabIndex),

Line 2243: -- Determine rows to change in WF_USER_ROLE_ASSIGNMENTS. Can be any role

2239: AND USER_ORIG_SYSTEM_ID = l_roleInfoTAB(1).ORIG_SYSTEM_ID);
2240: l_wfcount_tab.TABLE_NAME := 'WF_LOCAL_USER_ROLES';
2241: pipe ROW (l_wfcount_tab);
2242:
2243: -- Determine rows to change in WF_USER_ROLE_ASSIGNMENTS. Can be any role
2244: select nvl(count(1), 0) into l_wfcount_tab.REC_CNT
2245: from WF_USER_ROLE_ASSIGNMENTS
2246: WHERE (ROLE_NAME = p_name
2247: AND ROLE_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM

Line 2245: from WF_USER_ROLE_ASSIGNMENTS

2241: pipe ROW (l_wfcount_tab);
2242:
2243: -- Determine rows to change in WF_USER_ROLE_ASSIGNMENTS. Can be any role
2244: select nvl(count(1), 0) into l_wfcount_tab.REC_CNT
2245: from WF_USER_ROLE_ASSIGNMENTS
2246: WHERE (ROLE_NAME = p_name
2247: AND ROLE_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM
2248: AND ROLE_ORIG_SYSTEM_ID = l_roleInfoTAB(1).ORIG_SYSTEM_ID)
2249: OR

Line 2253: l_wfcount_tab.TABLE_NAME := 'WF_USER_ROLE_ASSIGNMENTS';

2249: OR
2250: (USER_NAME = p_name
2251: AND USER_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM
2252: AND USER_ORIG_SYSTEM_ID = l_roleInfoTAB(1).ORIG_SYSTEM_ID);
2253: l_wfcount_tab.TABLE_NAME := 'WF_USER_ROLE_ASSIGNMENTS';
2254: pipe ROW (l_wfcount_tab);
2255:
2256: -- Determine rows to change in WF_ROLE_HIERARCHIES. Applies to roles only
2257: if l_roleInfoTAB(1).ORIG_SYSTEM NOT in ('PER','FND_USR') then