DBA Data[Home] [Help]

APPS.WF_LOCAL_SYNCH dependencies on WF_DIRECTORY

Line 13: g_trustedRoles WF_DIRECTORY.roleTable;

9: g_BaseLanguage VARCHAR2(30) := 'AMERICAN';
10: g_BaseTerritory VARCHAR2(30) := 'AMERICA';
11: g_temptablespace VARCHAR2(30);
12: g_modulePkg varchar2(100) := 'wf.plsql.WF_LOCAL_SYNCH';
13: g_trustedRoles WF_DIRECTORY.roleTable;
14: g_trustTimeStamp DATE;
15:
16: ------------------------------------------------------------------------------
17: -- Role variables

Line 629: -- p_stage_table came from table wf_directory_partitions

625: --Open the Stage Cursor
626: l_stageCursor := DBMS_SQL.open_cursor;
627:
628: --Select one row to get the description.
629: -- p_stage_table came from table wf_directory_partitions
630: -- also l_sql is not to be run, but to get the columns
631: -- BINDVAR_SCAN_IGNORE
632: l_sql := 'select * from '||p_stage_table||' where rownum < 2';
633: DBMS_SQL.parse(c=>l_stageCursor, statement=>l_sql,

Line 649: -- p_seed_view came from table wf_directory_partitions

645: --Open the Seed Cursor
646: l_seedCursor := DBMS_SQL.open_cursor;
647:
648: --Select one row to get the description.
649: -- p_seed_view came from table wf_directory_partitions
650: -- also l_sql is not to be run, but to get the columns
651: -- BINDVAR_SCAN_IGNORE
652: l_sql := 'select * from '||p_seed_view||' where rownum < 2';
653: DBMS_SQL.parse(c=>l_seedCursor, statement=>l_sql,

Line 665: from WF_DIRECTORY_PARTITIONS

661:
662: --Retrieve the partition id.
663: select PARTITION_ID, ORIG_SYSTEM
664: into l_partitionID, l_partitionName
665: from WF_DIRECTORY_PARTITIONS
666: where ORIG_SYSTEM = upper(p_orig_system);
667:
668: --We now have two description tables that we can compare and build our
669: --column and select lists. We will also apply the special rules in this api

Line 954: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

950: end loop;
951: end if;
952:
953: if ( g_oldName is NOT NULL) then
954: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,
955: l_partitionName);
956: --We inline update the role and direct user/role then raise the event so
957: --the rest of the work can be deferred.
958: if (l_partitionID = 1) then

Line 1115: WF_DIRECTORY.SetUserAttr( user_name=>g_name,

1111: null;
1112: end;
1113:
1114: begin
1115: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1116: orig_system=>g_origSystem,
1117: orig_system_id=>g_origSystemID,
1118: display_name=>g_displayName,
1119: description=>g_description,

Line 1158: WF_DIRECTORY.CreateUser( name=>g_name,

1154: l_auxLastUpdLogin := g_lastUpdateLogin;
1155: l_auxLastUpdBy:= g_lastUpdatedBy;
1156: end if; --
1157:
1158: WF_DIRECTORY.CreateUser( name=>g_name,
1159: display_name=>g_displayName,
1160: orig_system=>g_origSystem,
1161: orig_system_id=>g_origSystemID,
1162: language=>g_language,

Line 1204: WF_DIRECTORY.ReassignUserRoles(g_name, p_orig_system,

1200: -- If we were able to delete an fnd_user from wf_local_roles then
1201: -- We can change any wf_local_user_roles over to PER.
1202:
1203: -- We will now reassign all active user/role relationships.
1204: WF_DIRECTORY.ReassignUserRoles(g_name, p_orig_system,
1205: p_orig_system_id, g_origSystem,
1206: g_origSystemID, g_lastUpdateDate,
1207: g_lastUpdatedBy, g_lastUpdateLogin
1208: , g_overWrite_UserRoles -- <6817561>

Line 1249: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the

1245: --switched from one employee to another).
1246: if (l_oldOrigSystemID is NOT NULL) then
1247: -- First, we must expire the existing User/Role relationship
1248: -- from the user to itself.
1249: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1250: self-references
1251: begin
1252: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1253: role_name=>g_name,

Line 1252: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,

1248: -- from the user to itself.
1249: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1250: self-references
1251: begin
1252: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1253: role_name=>g_name,
1254: start_date=>to_date(NULL),
1255: end_date=>sysdate,
1256: user_orig_system=>'PER',

Line 1274: WF_DIRECTORY.ReassignUserRoles(g_name, g_origSystem,

1270: end if;
1271: end;
1272: */
1273: -- Now we can reassign any active user/role relationships.
1274: WF_DIRECTORY.ReassignUserRoles(g_name, g_origSystem,
1275: l_oldOrigSystemID, g_origSystem,
1276: g_origSystemID, g_lastUpdateDate,
1277: g_lastUpdatedBy, g_lastUpdateLogin
1278: , g_overWrite_UserRoles -- <6817561>

Line 1307: WF_DIRECTORY.CreateUser( name=>g_name,

1303: l_auxLastUpdLogin := g_lastUpdateLogin;
1304: l_auxLastUpdBy:= g_lastUpdatedBy;
1305: end if; --
1306:
1307: WF_DIRECTORY.CreateUser( name=>g_name,
1308: display_name=>g_displayName,
1309: orig_system=>g_origSystem,
1310: orig_system_id=>g_origSystemID,
1311: language=>g_language,

Line 1330: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the

1326: creation_date=>g_creationDate,
1327: last_update_date=>l_auxLastUpdDate);
1328:
1329: -- Expire the old user/role relationship with itself.
1330: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1331: self-references
1332: begin
1333: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1334: role_name=>g_name,

Line 1333: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,

1329: -- Expire the old user/role relationship with itself.
1330: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1331: self-references
1332: begin
1333: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1334: role_name=>g_name,
1335: end_date=>sysdate,
1336: user_orig_system=>'PER',
1337: user_orig_system_id=>g_employeeID,

Line 1354: WF_DIRECTORY.ReassignUserRoles(g_name, 'PER', g_employeeID,

1350: end if;
1351: end;
1352: */
1353: -- Now we need to update all of the user_roles back to the fnd_user.
1354: WF_DIRECTORY.ReassignUserRoles(g_name, 'PER', g_employeeID,
1355: p_orig_system, p_orig_system_id,
1356: g_lastUpdateDate, g_lastUpdatedBy,
1357: g_lastUpdateLogin
1358: , g_overWrite_UserRoles -- <6817561>

Line 1367: WF_DIRECTORY.SetUserAttr( user_name=>g_name,

1363: g_origSystem := p_orig_system;
1364: g_origSystemID := p_orig_system_id;
1365:
1366: begin
1367: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1368: orig_system=>g_origSystem,
1369: orig_system_id=>g_origSystemID,
1370: display_name=>g_displayName,
1371: description=>g_description,

Line 1396: WF_DIRECTORY.CreateUser( name=>g_name,

1392: WF_CORE.Clear;
1393: if NOT (g_delete) then
1394: l_status := nvl(g_status,'ACTIVE');
1395:
1396: WF_DIRECTORY.CreateUser( name=>g_name,
1397: display_name=>g_displayName,
1398: orig_system=>g_origSystem,
1399: orig_system_id=>g_origSystemID,
1400: language=>g_language,

Line 1451: WF_DIRECTORY.SetUserAttr( user_name=>g_name,

1447: g_origSystem := p_orig_system; --persons are now users.
1448: g_origSystemID := p_orig_system_id;
1449:
1450: begin
1451: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1452: orig_system=>g_origSystem,
1453: orig_system_id=>g_origSystemID,
1454: display_name=>g_displayName,
1455: description=>g_description,

Line 1480: WF_DIRECTORY.CreateUser( name=>g_name,

1476: WF_CORE.Clear;
1477: if NOT (g_delete) then
1478: l_status := nvl(g_status,'ACTIVE');
1479:
1480: WF_DIRECTORY.CreateUser( name=>g_name,
1481: display_name=>g_displayName,
1482: orig_system=>g_origSystem,
1483: orig_system_id=>g_origSystemID,
1484: language=>g_language,

Line 1597: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

1593: p_expiration_date);
1594:
1595: --First check to see if a name change was communicated.
1596: if ( g_oldName is NOT NULL) then
1597: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,
1598: l_partitionName);
1599:
1600: if (g_overWrite_UserRoles) then -- <6817561>
1601: l_overWrite_UserRoles := 'Y';

Line 1654: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

1650: WHERE ROLE_NAME = g_oldName;
1651:
1652: WF_MAINTENANCE.PropagateChangedName(OLDNAME=>g_oldName, NEWNAME=>g_name);
1653: elsif (g_overWrite_UserRoles) then -- <6817561>
1654: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,
1655: l_partitionName);
1656:
1657: --We will use the partition id where we can to improve performance.
1658: UPDATE WF_LOCAL_USER_ROLES

Line 1703: WF_DIRECTORY.SetUserAttr( user_name=>perRole.NAME,

1699: -- user). We preserved the NOTIFICATION_PREFERENCE, LANGUAGE and
1700: -- TERRITORY. Now we will set the origSystem and the origSystemID.
1701: -- We also can setg_updateOnly, because we know the record(s) exist(s).
1702:
1703: WF_DIRECTORY.SetUserAttr( user_name=>perRole.NAME,
1704: orig_system=>g_origSystem,
1705: orig_system_id=>g_origSystemID,
1706: display_name=>g_displayName,
1707: description=>g_description,

Line 1740: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,

1736: end if;
1737:
1738: if (g_updateOnly) then
1739: begin
1740: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1741: orig_system=>g_origSystem,
1742: orig_system_id=>g_origSystemID,
1743: display_name=>g_displayName,
1744: description=>g_description,

Line 1778: WF_DIRECTORY.CreateRole( role_name=>g_name,

1774:
1775: if ((NOT g_delete) AND (NOT g_updateOnly)) then
1776: begin
1777: l_status := nvl(g_status,'ACTIVE');
1778: WF_DIRECTORY.CreateRole( role_name=>g_name,
1779: role_display_name=>g_displayName,
1780: orig_system=>g_origSystem,
1781: orig_system_id=>g_origSystemID,
1782: language=>g_language,

Line 1815: --We let the wf_directory take care of nulls

1811: when OTHERS then
1812: if (WF_CORE.error_name = 'WF_DUP_ROLE') then
1813: WF_CORE.Clear;
1814: --Bug 3064439
1815: --We let the wf_directory take care of nulls
1816: --We just do update no new value other than the one passed.
1817: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1818: orig_system=>g_origSystem,
1819: orig_system_id=>g_origSystemID,

Line 1817: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,

1813: WF_CORE.Clear;
1814: --Bug 3064439
1815: --We let the wf_directory take care of nulls
1816: --We just do update no new value other than the one passed.
1817: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1818: orig_system=>g_origSystem,
1819: orig_system_id=>g_origSystemID,
1820: display_name=>g_displayName,
1821: description=>g_description,

Line 1994: WF_DIRECTORY.GetRoleOrigSysInfo(p_user_name, l_uorigSys, l_uorigSysID);

1990: begin
1991: --Need to check if the orig_system info is null.
1992: if ((p_user_orig_system is NULL) or (p_user_orig_system_id is NULL) or
1993: (p_role_orig_system is NULL) or (p_role_orig_system_id is NULL)) then
1994: WF_DIRECTORY.GetRoleOrigSysInfo(p_user_name, l_uorigSys, l_uorigSysID);
1995: WF_DIRECTORY.GetRoleOrigSysInfo(p_role_name, l_rorigSys, l_rorigSysID);
1996:
1997: else
1998: l_uorigSys := UPPER(p_user_orig_system);

Line 1995: WF_DIRECTORY.GetRoleOrigSysInfo(p_role_name, l_rorigSys, l_rorigSysID);

1991: --Need to check if the orig_system info is null.
1992: if ((p_user_orig_system is NULL) or (p_user_orig_system_id is NULL) or
1993: (p_role_orig_system is NULL) or (p_role_orig_system_id is NULL)) then
1994: WF_DIRECTORY.GetRoleOrigSysInfo(p_user_name, l_uorigSys, l_uorigSysID);
1995: WF_DIRECTORY.GetRoleOrigSysInfo(p_role_name, l_rorigSys, l_rorigSysID);
1996:
1997: else
1998: l_uorigSys := UPPER(p_user_orig_system);
1999: l_uorigSysID := UPPER(p_user_orig_system_id);

Line 2006: WF_DIRECTORY.SetUserRoleAttr(user_name=>p_user_name,

2002:
2003: end if;
2004:
2005:
2006: WF_DIRECTORY.SetUserRoleAttr(user_name=>p_user_name,
2007: role_name=>p_role_name,
2008: start_date=>p_start_date,
2009: end_date=>p_expiration_date,
2010: user_orig_system=>l_uorigSys,

Line 2032: WF_DIRECTORY.CreateUserRole(user_name=>p_user_name,

2028: exception
2029: when OTHERS then
2030: if (WF_CORE.error_name = 'WF_INVAL_USER_ROLE') then
2031: WF_CORE.Clear;
2032: WF_DIRECTORY.CreateUserRole(user_name=>p_user_name,
2033: role_name=>p_role_name,
2034: start_date=>p_start_date,
2035: end_date=>p_expiration_date,
2036: user_orig_system=>l_uorigSys,

Line 2133: -- p_roletlview came from wf_directory_partitions

2129: p_columnList=>l_columnList,
2130: p_selectList=>l_selectList)) then
2131: -- l_selectList is controlled by us
2132: -- g_parallel must not be varchar
2133: -- p_roletlview came from wf_directory_partitions
2134: -- BINDVAR_SCAN_IGNORE[4]
2135: l_sql := ( 'insert /*+ append parallel(T, '||to_char(g_parallel)||
2136: ') */ into '||wf_schema||'.WF_LOCAL_ROLES_TL_STAGE T ('||
2137: l_columnList||') select /*+ parallel(R, '||

Line 2181: -- p_partitionName cames from wf_directory_partions

2177: 'in exclusive mode';
2178:
2179: --Partition exchange the temp table into the wf_local_roles table.
2180: -- wf_schema came from wf_resources
2181: -- p_partitionName cames from wf_directory_partions
2182: -- BINDVAR_SCAN_IGNORE[8]
2183: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_ROLES_TL ' ||
2184: 'EXCHANGE PARTITION ' || p_partitionName ||
2185: ' WITH TABLE ' ||wf_schema||

Line 2252: WF_DIRECTORY.AssignPartition(p_orig_system,

2248:
2249: end loop;
2250:
2251: --Check the partition this orig_system belongs to.
2252: WF_DIRECTORY.AssignPartition(p_orig_system,
2253: l_partitionID, l_partitionName);
2254:
2255: --If we received a partition_id of 0, this p_orig_system cannot be
2256: --BulkSynched

Line 2266: FROM wf_directory_partitions

2262:
2263: --Retrieve the role and the user/role view names to be used.
2264: SELECT trim(role_view) , trim(role_tl_view)
2265: INTO l_roleView ,l_role_tl_view
2266: FROM wf_directory_partitions
2267: WHERE partition_id = l_partitionID;
2268: --Enable parallel DML
2269: execute IMMEDIATE 'alter session enable parallel dml';
2270:

Line 2287: -- l_partitionName came from wf_directory_partitions

2283: p_selectList=>l_selectList)) then
2284: -- g_parallel must not be varchar2
2285: -- wf_schema came from wf_resources
2286: -- l_selectList is controlled by us
2287: -- l_partitionName came from wf_directory_partitions
2288: -- BINDVAR_SCAN_IGNORE[5]
2289: l_sql := ( 'insert /*+ append parallel(T, '||to_char(g_parallel)||
2290: ') */ into '||wf_schema||'.WF_LOCAL_ROLES_STAGE T '||
2291: '('||l_columnList||') select /*+ parallel(R, '||

Line 2331: -- l_partitionName came from wf_directory_partitions

2327: execute IMMEDIATE 'lock table '||wf_schema||'.WF_LOCAL_ROLES '||
2328: 'in exclusive mode';
2329: --Partition exchange the temp table into the wf_local_roles table.
2330: -- wf_schema came from wf_resources
2331: -- l_partitionName came from wf_directory_partitions
2332: -- BINDVAR_SCAN_IGNORE[4]
2333: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_ROLES ' ||
2334: 'EXCHANGE PARTITION ' || l_partitionName ||
2335: ' WITH TABLE ' ||wf_schema|| '.WF_LOCAL_ROLES_STAGE INCLUDING '||

Line 2427: WF_DIRECTORY.AssignPartition(p_orig_system,

2423: IgnoreNotFound=>TRUE);
2424:
2425: end loop;
2426: --Check the partition this orig_system belongs to.
2427: WF_DIRECTORY.AssignPartition(p_orig_system,
2428: l_partitionID, l_partitionName);
2429:
2430: --Retrieve the role and the user/role view names to be used.
2431: SELECT trim(user_role_view)

Line 2433: FROM wf_directory_partitions

2429:
2430: --Retrieve the role and the user/role view names to be used.
2431: SELECT trim(user_role_view)
2432: INTO l_userRoleView
2433: FROM wf_directory_partitions
2434: WHERE partition_id = l_partitionID;
2435:
2436: --Enable parallel DML
2437: execute IMMEDIATE 'alter session enable parallel dml';

Line 2455: -- l_userRoleView came from wf_directory_partitions

2451: -- g_parallel must be number
2452: -- wf_schema came from wf_resources
2453: -- l_columnList came from DBMS_SQL.describe_columns()
2454: -- l_selectList controlled by us
2455: -- l_userRoleView came from wf_directory_partitions
2456: -- l_partitionName came from wf_directory_partitions
2457: -- BINDVAR_SCAN_IGNORE[5]
2458: l_sql := ( 'insert /*+ append parallel(T, '||to_char(g_parallel)||
2459: ') */ into '||wf_schema||'.WF_UR_ASSIGNMENTS_STAGE T '||

Line 2456: -- l_partitionName came from wf_directory_partitions

2452: -- wf_schema came from wf_resources
2453: -- l_columnList came from DBMS_SQL.describe_columns()
2454: -- l_selectList controlled by us
2455: -- l_userRoleView came from wf_directory_partitions
2456: -- l_partitionName came from wf_directory_partitions
2457: -- BINDVAR_SCAN_IGNORE[5]
2458: l_sql := ( 'insert /*+ append parallel(T, '||to_char(g_parallel)||
2459: ') */ into '||wf_schema||'.WF_UR_ASSIGNMENTS_STAGE T '||
2460: '( '||l_columnList||' ) select /*+ parallel(R, '||

Line 2554: -- l_partitionName came from wf_directory_partitions

2550: execute IMMEDIATE 'lock table '||wf_schema||'.WF_LOCAL_USER_ROLES '||
2551: 'in exclusive mode';
2552: --Partition exchange the temp table into the wf_local_user_roles table.
2553: -- wf_schema came from wf_resources
2554: -- l_partitionName came from wf_directory_partitions
2555: -- BINDVAR_SCAN_IGNORE[4]
2556: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_USER_ROLES ' ||
2557: 'EXCHANGE PARTITION ' || l_partitionName ||
2558: ' WITH TABLE ' ||wf_schema||

Line 2651: WF_DIRECTORY.AssignPartition(origsys.name,

2647: --one eg : PER to fnd_usr
2648: --Checking it will avoid erroring off down the line
2649: --when you try to sync and the base orig system is
2650: --Hierarchy enabled
2651: WF_DIRECTORY.AssignPartition(origsys.name,
2652: l_partitionID, l_partitionName);
2653: if NOT (WF_ROLE_HIERARCHY.HierarchyEnabled(l_partitionName)) then
2654: syncRoles(origsys.name);
2655: syncUserRoles(origsys.name);

Line 2698: WF_DIRECTORY.AssignPartition(p_orig_system,

2694: --one eg : PER to fnd_usr
2695: --Checking it will avoid erroring off down the line
2696: --when you try to sync and the base orig system is
2697: --Hierarchy enabled
2698: WF_DIRECTORY.AssignPartition(p_orig_system,
2699: l_partitionID, l_partitionName);
2700: if NOT (WF_ROLE_HIERARCHY.HierarchyEnabled(l_partitionName)) then
2701: syncRoles(p_orig_system);
2702: syncUserRoles(p_orig_system);