DBA Data[Home] [Help]

APPS.WF_MAINTENANCE dependencies on WF_LOCAL_USER_ROLES

Line 746: -- Fix incorrect Effective_End_Date in WF_LOCAL_USER_ROLES as pert of bug 8423138

742: raise;
743: END FixWURAEffectiveDates;
744:
745: -- procedure FixLUREffectiveDates (private)
746: -- Fix incorrect Effective_End_Date in WF_LOCAL_USER_ROLES as pert of bug 8423138
747: --
748: -- IN:
749: -- No p_maxRows. This parameter comes from main procedure ValidateUserRoles
750: --

Line 766: from wf_local_user_roles lur,

762:
763: cursor c_invalidEffectiveDates is
764: select lur.rowid,
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

Line 790: update WF_LOCAL_USER_ROLES

786: close c_invalidEffectiveDates;
787: if (l_LURTab.COUNT > 0) then
788: begin
789: forall i in l_LURTab.FIRST..l_LURTab.LAST
790: update WF_LOCAL_USER_ROLES
791: set EFFECTIVE_START_DATE=l_URAEffectiveStartDate(i),
792: EFFECTIVE_END_DATE=l_URAEffectiveEndDate(i)
793: where ROWID = l_LURTab(i);
794: exception

Line 921: from wf_local_user_roles wur

917: user_end_date, role_end_date, partition_id,
918: effective_start_date, effective_end_date, user_orig_system,
919: user_orig_system_id, role_orig_system, role_orig_system_id,
920: parent_orig_system, parent_orig_system_id, owner_tag
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

Line 951: -- in WF_LOCAL_USER_ROLES

947: );
948:
949:
950: -- Records with invalid or duplicate FND_USR/PER references
951: -- in WF_LOCAL_USER_ROLES
952: -- For bug 6752821: no need for cursors %2 and %3 as role_name does not intervene,
953: -- no (FND_RESP) partition is considered.
954:
955: cursor c_invalOrigSys (p_username varchar2) is

Line 959: from wf_local_user_roles wur,

955: cursor c_invalOrigSys (p_username varchar2) is
956: select wu.orig_system, wu.orig_system_id,
957: wur.role_orig_system, wur.role_orig_system_id,
958: wur.partition_id, wur.rowid
959: from wf_local_user_roles wur,
960: wf_local_roles partition (FND_USR) wu
961: where (p_username is null or wu.name = p_username )
962: and wu.name = wur.user_name
963: and wur.user_orig_system in ('FND_USR','PER')

Line 984: from wf_local_user_roles partition (FND_USR) wur,

980:
981: cursor c_userSelfReference (p_username varchar2) is
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)

Line 1057: from wf_local_user_roles

1053:
1054: -- Dangling records
1055: CURSOR dangling_UR_refs (p_username varchar2 , p_rolename varchar2) is
1056: select rowid
1057: from wf_local_user_roles
1058: where (p_username IS NULL OR user_name= p_username )
1059: AND (p_rolename IS NULL OR role_name = p_rolename)
1060: AND ( not exists (select null from wf_local_roles
1061: WHERE name= user_name

Line 1124: DELETE from WF_LOCAL_USER_ROLES

1120: close dangling_UR_refs;
1121:
1122: if (l_rowIDTAB.COUNT > 0) then
1123: forall i in l_rowIDTAB.FIRST..l_rowIDTAB.LAST
1124: DELETE from WF_LOCAL_USER_ROLES
1125: WHERE rowid = l_rowIDTAB(i);
1126: commit;
1127: end if;
1128:

Line 1294: -- WF_LOCAL_USER_ROLES

1290: end; --End of duplicate/invalid FND_USR/PER user correction.
1291:
1292: -- Now we correct the FND_USR/PER orig_system values on the user side
1293: -- of user/role assignments as well as user-self-references in
1294: -- WF_LOCAL_USER_ROLES
1295:
1296: begin
1297: <>
1298: loop

Line 1323: UPDATE WF_LOCAL_USER_ROLES

1319: --perform the bulk update.. delete duplicates in case of
1320: -- dup_val_on_index Exception.
1321: begin
1322: forall i in l_rowIDTAB.FIRST..l_rowIDTAB.LAST save exceptions
1323: UPDATE WF_LOCAL_USER_ROLES
1324: SET user_orig_system = l_userOrigSrcTAB(i),
1325: user_orig_system_id = l_userOrigIDSrcTAB(i),
1326: role_orig_system = l_roleOrigSrcTAB(i),
1327: role_orig_system_id = l_roleOrigIDSrcTAB(i)

Line 1334: delete from wf_local_user_roles

1330: when others then
1331: for j in 1..sql%bulk_exceptions.count loop
1332: if (sql%bulk_exceptions(j).ERROR_CODE = 1) then
1333: l_eIndex := sql%bulk_exceptions(j).ERROR_INDEX;
1334: delete from wf_local_user_roles
1335: where rowid = l_rowIDTAB(l_eIndex);
1336: end if;
1337: end loop;
1338: end;

Line 1353: end; --End of duplicate/invalid FND_USR/PER correction in WF_LOCAL_USER_ROLES.

1349: close c_invalOrigSys;
1350: end if;
1351:
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

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 1445: -- update WF_LOCAL_USER_ROLES

1441:
1442: --Commit work to save rollback
1443: commit;
1444:
1445: -- update WF_LOCAL_USER_ROLES
1446: begin
1447: if (p_UpdateWho is not null and p_UpdateWho) then
1448: forall tabIndex in l_rowIDSrcTAB.FIRST..l_rowIDSrcTAB.LAST save exceptions
1449: update wf_local_user_roles partition (FND_USR)

Line 1449: update wf_local_user_roles partition (FND_USR)

1445: -- update WF_LOCAL_USER_ROLES
1446: begin
1447: if (p_UpdateWho is not null and p_UpdateWho) then
1448: forall tabIndex in l_rowIDSrcTAB.FIRST..l_rowIDSrcTAB.LAST save exceptions
1449: update wf_local_user_roles partition (FND_USR)
1450: set ROLE_START_DATE = l_StartSrcTAB(tabIndex),
1451: ROLE_END_DATE = l_EndSrcTAB(tabIndex),
1452: USER_START_DATE = l_StartSrcTAB(tabIndex),
1453: USER_END_DATE = l_EndSrcTAB(tabIndex),

Line 1466: update wf_local_user_roles partition (FND_USR)

1462: LAST_UPDATE_LOGIN = FND_GLOBAL.LOGIN_ID
1463: where rowid = l_rowIDSrcTAB(tabIndex);
1464: else --donot touch the WHO columns. This is default behavior
1465: forall tabIndex in l_rowIDSrcTAB.FIRST..l_rowIDSrcTAB.LAST save exceptions
1466: update wf_local_user_roles partition (FND_USR)
1467: set ROLE_START_DATE = l_StartSrcTAB(tabIndex),
1468: ROLE_END_DATE = l_EndSrcTAB(tabIndex),
1469: USER_START_DATE = l_StartSrcTAB(tabIndex),
1470: USER_END_DATE = l_EndSrcTAB(tabIndex),

Line 1570: WF_LOCAL_USER_ROLES WUR ,

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
1574: WHERE WURA.PARTITION_ID = WAR.PARTITION_ID

Line 1750: UPDATE WF_LOCAL_USER_ROLES wur

1746: --information when duplicate user/role
1747: --combinations are spread across multiple groups
1748: if (p_UpdateWho is not null and p_UpdateWho) then
1749: forall destTabIndex in l_roleDestTab.FIRST..l_roleDestTab.LAST
1750: UPDATE WF_LOCAL_USER_ROLES wur
1751: SET ROLE_START_DATE = l_roleStartDestTAB(destTabIndex),
1752: ROLE_END_DATE = l_roleEndDestTAB(destTabIndex),
1753: USER_START_DATE = l_userStartDestTAB(destTabIndex),
1754: USER_END_DATE = l_userEndDestTAB(destTabIndex),

Line 1766: UPDATE WF_LOCAL_USER_ROLES wur

1762: LAST_UPDATE_DATE = SYSDATE
1763: WHERE rowid = l_rowIDDestTAB(destTabIndex);
1764: else --Do not touch WHO columns. This is default behavior
1765: forall destTabIndex in l_roleDestTab.FIRST..l_roleDestTab.LAST
1766: UPDATE WF_LOCAL_USER_ROLES wur
1767: SET ROLE_START_DATE = l_roleStartDestTAB(destTabIndex),
1768: ROLE_END_DATE = l_roleEndDestTAB(destTabIndex),
1769: USER_START_DATE = l_userStartDestTAB(destTabIndex),
1770: USER_END_DATE = l_userEndDestTAB(destTabIndex),

Line 1921: UPDATE WF_LOCAL_USER_ROLES wur

1917:
1918: if (l_roleDestTAB.COUNT) > 0 then
1919: if (p_UpdateWho is not null and p_UpdateWho) then
1920: forall destTabIndex in l_roleDestTab.FIRST..l_roleDestTab.LAST
1921: UPDATE WF_LOCAL_USER_ROLES wur
1922: SET ROLE_START_DATE = l_roleStartDestTAB(destTabIndex),
1923: ROLE_END_DATE = l_roleEndDestTAB(destTabIndex),
1924: USER_START_DATE = l_userStartDestTAB(destTabIndex),
1925: USER_END_DATE = l_userEndDestTAB(destTabIndex),

Line 1937: UPDATE WF_LOCAL_USER_ROLES wur

1933: LAST_UPDATE_DATE = SYSDATE
1934: WHERE rowid = l_rowIDDestTAB(destTabIndex);
1935: else --Do not touch WHO columns. This is default behavior.
1936: forall destTabIndex in l_roleDestTab.FIRST..l_roleDestTab.LAST
1937: UPDATE WF_LOCAL_USER_ROLES wur
1938: SET ROLE_START_DATE = l_roleStartDestTAB(destTabIndex),
1939: ROLE_END_DATE = l_roleEndDestTAB(destTabIndex),
1940: USER_START_DATE = l_userStartDestTAB(destTabIndex),
1941: USER_END_DATE = l_userEndDestTAB(destTabIndex),

Line 2230: -- Determine rows to change in WF_LOCAL_USER_ROLES. Can be any role

2226: AND ORIG_SYSTEM_ID = l_roleInfoTAB(1).ORIG_SYSTEM_ID;
2227: l_wfcount_tab.TABLE_NAME := 'WF_LOCAL_ROLES';
2228: pipe ROW (l_wfcount_tab);
2229:
2230: -- Determine rows to change in WF_LOCAL_USER_ROLES. Can be any role
2231: select nvl(count(1), 0) into l_wfcount_tab.REC_CNT
2232: from WF_LOCAL_USER_ROLES
2233: WHERE (ROLE_NAME = p_name
2234: AND ROLE_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM

Line 2232: from WF_LOCAL_USER_ROLES

2228: pipe ROW (l_wfcount_tab);
2229:
2230: -- Determine rows to change in WF_LOCAL_USER_ROLES. Can be any role
2231: select nvl(count(1), 0) into l_wfcount_tab.REC_CNT
2232: from WF_LOCAL_USER_ROLES
2233: WHERE (ROLE_NAME = p_name
2234: AND ROLE_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM
2235: AND ROLE_ORIG_SYSTEM_ID = l_roleInfoTAB(1).ORIG_SYSTEM_ID)
2236: OR

Line 2240: l_wfcount_tab.TABLE_NAME := 'WF_LOCAL_USER_ROLES';

2236: OR
2237: (USER_NAME = p_name
2238: AND USER_ORIG_SYSTEM = l_roleInfoTAB(1).ORIG_SYSTEM
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