360: l_api varchar2(250) := g_plsqlName ||'GetRoleInfo2';
361: l_logPROC boolean := false;
362:
363: begin
364: l_logPROC := WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level;
365: if( l_logPROC ) then
366: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
367: end if;
368:
362:
363: begin
364: l_logPROC := WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level;
365: if( l_logPROC ) then
366: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
367: end if;
368:
369: --Check for composite name.
370: l_isComposite := CompositeName(role, l_origSystem, l_origSystemID);
402: );
403:
404: if (role_info_tbl.COUNT = 0 or role_info_tbl(1).display_name is NULL) then
405: if( l_logPROC ) then
406: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,
407: 'no records found by wfa_sec.get_role_info3(), querying *active* roles in other partitions then.');
408: end if;
409:
410: if NOT (l_isComposite) then
408: end if;
409:
410: if NOT (l_isComposite) then
411: if( l_logPROC ) then
412: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'case of no composite name');
413: end if;
414:
415: -- try to select from all the ORIG_SYSTEMs that have no colon.
416: -- we query FNDRESPXXX also since we cannot list all of them here.
449: and rownum = 1;
450:
451: else
452: if( l_logPROC ) then
453: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'case of composite name, querying with orig_system');
454: end if;
455:
456: select R.NAME,
457: substrb(R.DISPLAY_NAME,1,360),
492: role_info_tbl(1).name := role;
493: end if;
494:
495: if( l_logPROC ) then
496: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
497: end if;
498: exception
499: when no_data_found then
500: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
496: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
497: end if;
498: exception
499: when no_data_found then
500: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
501: wf_log_pkg.String(WF_LOG_PKG.LEVEL_EXCEPTION, l_api,'role not found, querying ALL roles');
502: end if;
503: --If the role is not found in the local tables, we will check the view to make
504: --sure we continue to support standalone which has not denormalized wfds.
497: end if;
498: exception
499: when no_data_found then
500: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
501: wf_log_pkg.String(WF_LOG_PKG.LEVEL_EXCEPTION, l_api,'role not found, querying ALL roles');
502: end if;
503: --If the role is not found in the local tables, we will check the view to make
504: --sure we continue to support standalone which has not denormalized wfds.
505: begin
504: --sure we continue to support standalone which has not denormalized wfds.
505: begin
506: if NOT (l_isComposite) then
507: if( l_logPROC ) then
508: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'case of not composite role name');
509: end if;
510: select R.NAME,
511: substrb(R.DISPLAY_NAME,1,360),
512: substrb(R.DESCRIPTION,1,1000),
539: and R.PARTITION_ID not in (9,8,7,6,4)
540: and rownum = 1;
541: else
542: if( l_logPROC ) then
543: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'case of composite role name');
544: end if;
545:
546: select R.NAME,
547: substrb(R.DISPLAY_NAME,1,360),
577: and rownum = 1;
578: end if;
579:
580: if( l_logPROC ) then
581: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
582: end if;
583: exception
584: when NO_DATA_FOUND then
585: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
581: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
582: end if;
583: exception
584: when NO_DATA_FOUND then
585: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
586: wf_log_pkg.String(WF_LOG_PKG.LEVEL_EXCEPTION, l_api,'role not found again, setting role_info_tbl fields to NULL');
587: end if;
588: role_info_tbl(1).name := '';
589: role_info_tbl(1).display_name := '';
582: end if;
583: exception
584: when NO_DATA_FOUND then
585: if( WF_LOG_PKG.LEVEL_EXCEPTION >= fnd_log.g_current_runtime_level) then
586: wf_log_pkg.String(WF_LOG_PKG.LEVEL_EXCEPTION, l_api,'role not found again, setting role_info_tbl fields to NULL');
587: end if;
588: role_info_tbl(1).name := '';
589: role_info_tbl(1).display_name := '';
590: role_info_tbl(1).description := '';
611: role_info_tbl(1).NLS_SORT :='';
612: role_info_tbl(1).NLS_CURRENCY :='';
613:
614: if( l_logPROC ) then
615: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
616: end if;
617: end;
618:
619: when others then
696: l_role_info_tbl wf_directory.wf_local_roles_tbl_type;
697: l_api varchar2(250) := g_plsqlName ||'GetRoleInfoMail2';
698:
699: begin
700: if( WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level ) then
701: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
702: end if;
703:
704: Wf_Directory.GetRoleInfo2(p_role, l_role_info_tbl);
697: l_api varchar2(250) := g_plsqlName ||'GetRoleInfoMail2';
698:
699: begin
700: if( WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level ) then
701: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
702: end if;
703:
704: Wf_Directory.GetRoleInfo2(p_role, l_role_info_tbl);
705:
727: when NO_DATA_FOUND then
728: p_installed_flag := 'N';
729: end;
730:
731: if( WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level ) then
732: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
733: end if;
734: exception
735: when others then
728: p_installed_flag := 'N';
729: end;
730:
731: if( WF_LOG_PKG.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level ) then
732: wf_log_pkg.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
733: end if;
734: exception
735: when others then
736: wf_core.context('Wf_Directory','GetRoleInfoMail2', p_role);
4497: l_overWriteUserRoles varchar2(2) := 'N';
4498: l_api varchar2(250) := g_plsqlName ||'ReassignUserRoles';
4499:
4500: BEGIN
4501: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4502: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
4503: end if;
4504:
4505: -- <6817561>
4498: l_api varchar2(250) := g_plsqlName ||'ReassignUserRoles';
4499:
4500: BEGIN
4501: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4502: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
4503: end if;
4504:
4505: -- <6817561>
4506: if (p_overWriteUserRoles) then
4585: Where USER_ORIG_SYSTEM = p_old_user_origSystem
4586: And USER_ORIG_SYSTEM_ID = p_old_user_origSystemID
4587: And USER_NAME = p_user_name;
4588:
4589: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4590: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
4591: end if;
4592: END ReassignUserRoles;
4593:
4586: And USER_ORIG_SYSTEM_ID = p_old_user_origSystemID
4587: And USER_NAME = p_user_name;
4588:
4589: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4590: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
4591: end if;
4592: END ReassignUserRoles;
4593:
4594:
4803: l_origSystemID number;
4804: l_api varchar2(250) := g_plsqlName ||'GetInfoFromMail2';
4805:
4806: begin
4807: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4808: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
4809: end if;
4810:
4811: GetInfoFromMail(mailid => p_emailid,
4804: l_api varchar2(250) := g_plsqlName ||'GetInfoFromMail2';
4805:
4806: begin
4807: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4808: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'BEGIN');
4809: end if;
4810:
4811: GetInfoFromMail(mailid => p_emailid,
4812: role => l_name,
4856: p_nlsSort := '';
4857: p_nlsCurrency := '';
4858: end if;
4859:
4860: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4861: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
4862: end if;
4863: end GetInfoFromMail2;
4864:
4857: p_nlsCurrency := '';
4858: end if;
4859:
4860: if(wf_log_pkg.LEVEL_PROCEDURE >= fnd_log.g_current_runtime_level) then
4861: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_PROCEDURE, l_api,'END');
4862: end if;
4863: end GetInfoFromMail2;
4864:
4865: function IsMLSEnabled(p_orig_system in varchar2)
4973: --if we have reached here, it implies that the user or role
4974: -- is not truly end dated.
4975: -- raise error
4976:
4977: if(wf_log_pkg.level_exception >= fnd_log.g_current_runtime_level) then
4978: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
4979: 'WF_DIRECTORY.deleteRole',
4980: 'Role is still active. Make sure it is end dated ');
4981: end if;
4974: -- is not truly end dated.
4975: -- raise error
4976:
4977: if(wf_log_pkg.level_exception >= fnd_log.g_current_runtime_level) then
4978: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
4979: 'WF_DIRECTORY.deleteRole',
4980: 'Role is still active. Make sure it is end dated ');
4981: end if;
4982: WF_CORE.Context('WF_DIRECTORY', 'deleteRole', p_name);
5099: --if we have reached here, it implies that the role
5100: -- is not truly end dated.
5101: -- raise error
5102:
5103: if(wf_log_pkg.level_exception >=
5104: fnd_log.g_current_runtime_level) then
5105: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5106: 'WF_DIRECTORY.DeleteUserRole',
5107: 'User/Role assignment is still active. Make sure it is end dated ' ||
5101: -- raise error
5102:
5103: if(wf_log_pkg.level_exception >=
5104: fnd_log.g_current_runtime_level) then
5105: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5106: 'WF_DIRECTORY.DeleteUserRole',
5107: 'User/Role assignment is still active. Make sure it is end dated ' ||
5108: 'and removed from any hierarchies');
5109: end if;
5142: --if we have reached here, it implies that the user
5143: -- is not truly end dated.
5144: -- raise error
5145:
5146: if(wf_log_pkg.level_exception >=
5147: fnd_log.g_current_runtime_level) then
5148: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5149: 'WF_DIRECTORY.DeleteUserRole',
5150: 'User/Role assignment is still active. Make sure it is end dated ' ||
5144: -- raise error
5145:
5146: if(wf_log_pkg.level_exception >=
5147: fnd_log.g_current_runtime_level) then
5148: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5149: 'WF_DIRECTORY.DeleteUserRole',
5150: 'User/Role assignment is still active. Make sure it is end dated ' ||
5151: 'and removed from any hierarchies');
5152: end if;
5193: --if we have reached here, it implies that the user/role
5194: -- is not truly end dated.
5195: -- raise error
5196:
5197: if(wf_log_pkg.level_exception >=
5198: fnd_log.g_current_runtime_level) then
5199: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5200: 'WF_DIRECTORY.DeleteUserRole',
5201: 'User/Role assignment is still active. Make sure it is end dated ' ||
5195: -- raise error
5196:
5197: if(wf_log_pkg.level_exception >=
5198: fnd_log.g_current_runtime_level) then
5199: WF_LOG_PKG.String(WF_LOG_PKG.LEVEL_EXCEPTION,
5200: 'WF_DIRECTORY.DeleteUserRole',
5201: 'User/Role assignment is still active. Make sure it is end dated ' ||
5202: 'and removed from any hierarchies');
5203: end if;