2839: RAISE FND_API.G_EXC_ERROR;
2840: END IF;
2841:
2842: -- check if role exists, otherwise create a new role
2843: -- wf_local_roles using WF_DIRECTORY.CreateAdHocRole
2844:
2845: /* WF_DIRECTORY.GetRoleInfo
2846: (Role =>l_role_name,
2847: Display_Name =>l_role_display_name,
2850: Language =>l_lang,
2851: Territory =>l_territory
2852: );
2853: */
2854: --- assumption is wf_local_roles is a public table
2855: select count(1)
2856: into l_role_exists
2857: from WF_LOCAL_ROLES
2858: where name = l_role_name;
2853: */
2854: --- assumption is wf_local_roles is a public table
2855: select count(1)
2856: into l_role_exists
2857: from WF_LOCAL_ROLES
2858: where name = l_role_name;
2859:
2860: if l_role_exists = 0 then
2861: --create ad hoc role