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 631: -- p_stage_table came from table wf_directory_partitions

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

Line 651: -- p_seed_view came from table wf_directory_partitions

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

Line 667: from WF_DIRECTORY_PARTITIONS

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

Line 958: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

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

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

1115: null;
1116: end;
1117:
1118: begin
1119: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1120: orig_system=>g_origSystem,
1121: orig_system_id=>g_origSystemID,
1122: display_name=>g_displayName,
1123: description=>g_description,

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

1163: nvl(p_start_date, WR.START_DATE)
1164: into p_aux_exp_date, p_aux_start_date
1165: from WF_LOCAL_ROLES PARTITION (PER_ROLE) WR
1166: where WR.ORIG_SYSTEM_ID = g_employeeID;
1167: WF_DIRECTORY.CreateUser( name=>g_name,
1168: display_name=>g_displayName,
1169: orig_system=>g_origSystem,
1170: orig_system_id=>g_origSystemID,
1171: language=>g_language,

Line 1212: WF_DIRECTORY.ReassignUserRoles(g_name, p_orig_system,

1208: -- If we were able to delete an fnd_user from wf_local_roles then
1209: -- We can change any wf_local_user_roles over to PER.
1210:
1211: -- We will now reassign all active user/role relationships.
1212: WF_DIRECTORY.ReassignUserRoles(g_name, p_orig_system,
1213: p_orig_system_id, g_origSystem,
1214: g_origSystemID, g_lastUpdateDate,
1215: g_lastUpdatedBy, g_lastUpdateLogin
1216: , g_overWrite_UserRoles -- <6817561>

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

1253: --switched from one employee to another).
1254: if (l_oldOrigSystemID is NOT NULL) then
1255: -- First, we must expire the existing User/Role relationship
1256: -- from the user to itself.
1257: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1258: self-references
1259: begin
1260: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1261: role_name=>g_name,

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

1256: -- from the user to itself.
1257: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1258: self-references
1259: begin
1260: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1261: role_name=>g_name,
1262: start_date=>to_date(NULL),
1263: end_date=>sysdate,
1264: user_orig_system=>'PER',

Line 1282: WF_DIRECTORY.ReassignUserRoles(g_name, g_origSystem,

1278: end if;
1279: end;
1280: */
1281: -- Now we can reassign any active user/role relationships.
1282: WF_DIRECTORY.ReassignUserRoles(g_name, g_origSystem,
1283: l_oldOrigSystemID, g_origSystem,
1284: g_origSystemID, g_lastUpdateDate,
1285: g_lastUpdatedBy, g_lastUpdateLogin
1286: , g_overWrite_UserRoles -- <6817561>

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

1311: l_auxLastUpdLogin := g_lastUpdateLogin;
1312: l_auxLastUpdBy:= g_lastUpdatedBy;
1313: end if; --
1314:
1315: WF_DIRECTORY.CreateUser( name=>g_name,
1316: display_name=>g_displayName,
1317: orig_system=>g_origSystem,
1318: orig_system_id=>g_origSystemID,
1319: language=>g_language,

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

1334: creation_date=>g_creationDate,
1335: last_update_date=>l_auxLastUpdDate);
1336:
1337: -- Expire the old user/role relationship with itself.
1338: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1339: self-references
1340: begin
1341: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1342: role_name=>g_name,

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

1337: -- Expire the old user/role relationship with itself.
1338: /* WF_DIRECTORY.ReassignUserRoles was updated to handle the
1339: self-references
1340: begin
1341: WF_DIRECTORY.SetUserRoleAttr(user_name=>g_name,
1342: role_name=>g_name,
1343: end_date=>sysdate,
1344: user_orig_system=>'PER',
1345: user_orig_system_id=>g_employeeID,

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

1358: end if;
1359: end;
1360: */
1361: -- Now we need to update all of the user_roles back to the fnd_user.
1362: WF_DIRECTORY.ReassignUserRoles(g_name, 'PER', g_employeeID,
1363: p_orig_system, p_orig_system_id,
1364: g_lastUpdateDate, g_lastUpdatedBy,
1365: g_lastUpdateLogin
1366: , g_overWrite_UserRoles -- <6817561>

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

1371: g_origSystem := p_orig_system;
1372: g_origSystemID := p_orig_system_id;
1373:
1374: begin
1375: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1376: orig_system=>g_origSystem,
1377: orig_system_id=>g_origSystemID,
1378: display_name=>g_displayName,
1379: description=>g_description,

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

1400: WF_CORE.Clear;
1401: if NOT (g_delete) then
1402: l_status := nvl(g_status,'ACTIVE');
1403:
1404: WF_DIRECTORY.CreateUser( name=>g_name,
1405: display_name=>g_displayName,
1406: orig_system=>g_origSystem,
1407: orig_system_id=>g_origSystemID,
1408: language=>g_language,

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

1455: g_origSystem := p_orig_system; --persons are now users.
1456: g_origSystemID := p_orig_system_id;
1457:
1458: begin
1459: WF_DIRECTORY.SetUserAttr( user_name=>g_name,
1460: orig_system=>g_origSystem,
1461: orig_system_id=>g_origSystemID,
1462: display_name=>g_displayName,
1463: description=>g_description,

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

1484: WF_CORE.Clear;
1485: if NOT (g_delete) then
1486: l_status := nvl(g_status,'ACTIVE');
1487:
1488: WF_DIRECTORY.CreateUser( name=>g_name,
1489: display_name=>g_displayName,
1490: orig_system=>g_origSystem,
1491: orig_system_id=>g_origSystemID,
1492: language=>g_language,

Line 1610: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

1606: p_expiration_date);
1607:
1608: --First check to see if a name change was communicated.
1609: if ( g_oldName is NOT NULL) then
1610: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,
1611: l_partitionName);
1612:
1613: if (g_overWrite_UserRoles) then -- <6817561>
1614: l_overWrite_UserRoles := 'Y';

Line 1667: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,

1663: WHERE ROLE_NAME = g_oldName;
1664:
1665: WF_MAINTENANCE.PropagateChangedName(OLDNAME=>g_oldName, NEWNAME=>g_name);
1666: elsif (g_overWrite_UserRoles) then -- <6817561>
1667: WF_DIRECTORY.assignPartition(p_orig_system, l_partitionID,
1668: l_partitionName);
1669:
1670: --We will use the partition id where we can to improve performance.
1671: UPDATE WF_LOCAL_USER_ROLES

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

1748: -- user). We preserved the NOTIFICATION_PREFERENCE, LANGUAGE and
1749: -- TERRITORY. Now we will set the origSystem and the origSystemID.
1750: -- We also can setg_updateOnly, because we know the record(s) exist(s).
1751:
1752: WF_DIRECTORY.SetUserAttr( user_name=>perRole.NAME,
1753: orig_system=>g_origSystem,
1754: orig_system_id=>g_origSystemID,
1755: display_name=>g_displayName,
1756: description=>g_description,

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

1785: end if;
1786:
1787: if (g_updateOnly) then
1788: begin
1789: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1790: orig_system=>g_origSystem,
1791: orig_system_id=>g_origSystemID,
1792: display_name=>g_displayName,
1793: description=>g_description,

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

1823:
1824: if ((NOT g_delete) AND (NOT g_updateOnly)) then
1825: begin
1826: l_status := nvl(g_status,'ACTIVE');
1827: WF_DIRECTORY.CreateRole( role_name=>g_name,
1828: role_display_name=>g_displayName,
1829: orig_system=>g_origSystem,
1830: orig_system_id=>g_origSystemID,
1831: language=>g_language,

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

1860: when OTHERS then
1861: if (WF_CORE.error_name = 'WF_DUP_ROLE') then
1862: WF_CORE.Clear;
1863: --Bug 3064439
1864: --We let the wf_directory take care of nulls
1865: --We just do update no new value other than the one passed.
1866: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1867: orig_system=>g_origSystem,
1868: orig_system_id=>g_origSystemID,

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

1862: WF_CORE.Clear;
1863: --Bug 3064439
1864: --We let the wf_directory take care of nulls
1865: --We just do update no new value other than the one passed.
1866: WF_DIRECTORY.SetRoleAttr( role_name=>g_name,
1867: orig_system=>g_origSystem,
1868: orig_system_id=>g_origSystemID,
1869: display_name=>g_displayName,
1870: description=>g_description,

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

2040: begin
2041: --Need to check if the orig_system info is null.
2042: if ((p_user_orig_system is NULL) or (p_user_orig_system_id is NULL) or
2043: (p_role_orig_system is NULL) or (p_role_orig_system_id is NULL)) then
2044: WF_DIRECTORY.GetRoleOrigSysInfo(p_user_name, l_uorigSys, l_uorigSysID);
2045: WF_DIRECTORY.GetRoleOrigSysInfo(p_role_name, l_rorigSys, l_rorigSysID);
2046:
2047: else
2048: l_uorigSys := UPPER(p_user_orig_system);

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

2041: --Need to check if the orig_system info is null.
2042: if ((p_user_orig_system is NULL) or (p_user_orig_system_id is NULL) or
2043: (p_role_orig_system is NULL) or (p_role_orig_system_id is NULL)) then
2044: WF_DIRECTORY.GetRoleOrigSysInfo(p_user_name, l_uorigSys, l_uorigSysID);
2045: WF_DIRECTORY.GetRoleOrigSysInfo(p_role_name, l_rorigSys, l_rorigSysID);
2046:
2047: else
2048: l_uorigSys := UPPER(p_user_orig_system);
2049: l_uorigSysID := UPPER(p_user_orig_system_id);

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

2052:
2053: end if;
2054:
2055:
2056: WF_DIRECTORY.SetUserRoleAttr(user_name=>p_user_name,
2057: role_name=>p_role_name,
2058: start_date=>p_start_date,
2059: end_date=>p_expiration_date,
2060: user_orig_system=>l_uorigSys,

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

2078: exception
2079: when OTHERS then
2080: if (WF_CORE.error_name = 'WF_INVAL_USER_ROLE') then
2081: WF_CORE.Clear;
2082: WF_DIRECTORY.CreateUserRole(user_name=>p_user_name,
2083: role_name=>p_role_name,
2084: start_date=>p_start_date,
2085: end_date=>p_expiration_date,
2086: user_orig_system=>l_uorigSys,

Line 2183: -- p_roletlview came from wf_directory_partitions

2179: p_columnList=>l_columnList,
2180: p_selectList=>l_selectList)) then
2181: -- l_selectList is controlled by us
2182: -- g_parallel must not be varchar
2183: -- p_roletlview came from wf_directory_partitions
2184: -- BINDVAR_SCAN_IGNORE[4]
2185: if g_logging='LOGGING' then
2186: l_sql := 'insert ';
2187: else

Line 2235: -- p_partitionName cames from wf_directory_partions

2231: 'in exclusive mode';
2232:
2233: --Partition exchange the temp table into the wf_local_roles table.
2234: -- wf_schema came from wf_resources
2235: -- p_partitionName cames from wf_directory_partions
2236: -- BINDVAR_SCAN_IGNORE[8]
2237: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_ROLES_TL ' ||
2238: 'EXCHANGE PARTITION ' || p_partitionName ||
2239: ' WITH TABLE ' ||wf_schema||

Line 2306: WF_DIRECTORY.AssignPartition(p_orig_system,

2302:
2303: end loop;
2304:
2305: --Check the partition this orig_system belongs to.
2306: WF_DIRECTORY.AssignPartition(p_orig_system,
2307: l_partitionID, l_partitionName);
2308:
2309: --If we received a partition_id of 0, this p_orig_system cannot be
2310: --BulkSynched

Line 2320: FROM wf_directory_partitions

2316:
2317: --Retrieve the role and the user/role view names to be used.
2318: SELECT trim(role_view) , trim(role_tl_view)
2319: INTO l_roleView ,l_role_tl_view
2320: FROM wf_directory_partitions
2321: WHERE partition_id = l_partitionID;
2322: --Enable parallel DML
2323: execute IMMEDIATE 'alter session enable parallel dml';
2324:

Line 2341: -- l_partitionName came from wf_directory_partitions

2337: p_selectList=>l_selectList)) then
2338: -- g_parallel must not be varchar2
2339: -- wf_schema came from wf_resources
2340: -- l_selectList is controlled by us
2341: -- l_partitionName came from wf_directory_partitions
2342: -- BINDVAR_SCAN_IGNORE[5]
2343: if g_logging='LOGGING' then
2344: l_sql := 'insert ';
2345: else

Line 2389: -- l_partitionName came from wf_directory_partitions

2385: execute IMMEDIATE 'lock table '||wf_schema||'.WF_LOCAL_ROLES '||
2386: 'in exclusive mode';
2387: --Partition exchange the temp table into the wf_local_roles table.
2388: -- wf_schema came from wf_resources
2389: -- l_partitionName came from wf_directory_partitions
2390: -- BINDVAR_SCAN_IGNORE[4]
2391: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_ROLES ' ||
2392: 'EXCHANGE PARTITION ' || l_partitionName ||
2393: ' WITH TABLE ' ||wf_schema|| '.WF_LOCAL_ROLES_STAGE INCLUDING '||

Line 2485: WF_DIRECTORY.AssignPartition(p_orig_system,

2481: IgnoreNotFound=>TRUE);
2482:
2483: end loop;
2484: --Check the partition this orig_system belongs to.
2485: WF_DIRECTORY.AssignPartition(p_orig_system,
2486: l_partitionID, l_partitionName);
2487:
2488: --Retrieve the role and the user/role view names to be used.
2489: SELECT trim(user_role_view)

Line 2491: FROM wf_directory_partitions

2487:
2488: --Retrieve the role and the user/role view names to be used.
2489: SELECT trim(user_role_view)
2490: INTO l_userRoleView
2491: FROM wf_directory_partitions
2492: WHERE partition_id = l_partitionID;
2493:
2494: --Enable parallel DML
2495: execute IMMEDIATE 'alter session enable parallel dml';

Line 2513: -- l_userRoleView came from wf_directory_partitions

2509: -- g_parallel must be number
2510: -- wf_schema came from wf_resources
2511: -- l_columnList came from DBMS_SQL.describe_columns()
2512: -- l_selectList controlled by us
2513: -- l_userRoleView came from wf_directory_partitions
2514: -- l_partitionName came from wf_directory_partitions
2515: -- BINDVAR_SCAN_IGNORE[5]
2516: if g_logging='LOGGING' then
2517: l_sql:='insert ';

Line 2514: -- l_partitionName came from wf_directory_partitions

2510: -- wf_schema came from wf_resources
2511: -- l_columnList came from DBMS_SQL.describe_columns()
2512: -- l_selectList controlled by us
2513: -- l_userRoleView came from wf_directory_partitions
2514: -- l_partitionName came from wf_directory_partitions
2515: -- BINDVAR_SCAN_IGNORE[5]
2516: if g_logging='LOGGING' then
2517: l_sql:='insert ';
2518: else

Line 2620: -- l_partitionName came from wf_directory_partitions

2616: execute IMMEDIATE 'lock table '||wf_schema||'.WF_LOCAL_USER_ROLES '||
2617: 'in exclusive mode';
2618: --Partition exchange the temp table into the wf_local_user_roles table.
2619: -- wf_schema came from wf_resources
2620: -- l_partitionName came from wf_directory_partitions
2621: -- BINDVAR_SCAN_IGNORE[4]
2622: l_sql := 'ALTER TABLE ' ||wf_schema||'.WF_LOCAL_USER_ROLES ' ||
2623: 'EXCHANGE PARTITION ' || l_partitionName ||
2624: ' WITH TABLE ' ||wf_schema||

Line 2717: WF_DIRECTORY.AssignPartition(origsys.name,

2713: --one eg : PER to fnd_usr
2714: --Checking it will avoid erroring off down the line
2715: --when you try to sync and the base orig system is
2716: --Hierarchy enabled
2717: WF_DIRECTORY.AssignPartition(origsys.name,
2718: l_partitionID, l_partitionName);
2719: if NOT (WF_ROLE_HIERARCHY.HierarchyEnabled(l_partitionName)) then
2720: syncRoles(origsys.name);
2721: syncUserRoles(origsys.name);

Line 2764: WF_DIRECTORY.AssignPartition(p_orig_system,

2760: --one eg : PER to fnd_usr
2761: --Checking it will avoid erroring off down the line
2762: --when you try to sync and the base orig system is
2763: --Hierarchy enabled
2764: WF_DIRECTORY.AssignPartition(p_orig_system,
2765: l_partitionID, l_partitionName);
2766: if NOT (WF_ROLE_HIERARCHY.HierarchyEnabled(l_partitionName)) then
2767: syncRoles(p_orig_system);
2768: syncUserRoles(p_orig_system);