897: -- Check if the ADHOC role already exists
898: IF l_role_exists = 'Y'
899: THEN
900: -- If the role exists, then empty the existing role list
901: wf_directory.RemoveUsersFromAdHocRole
902: (role_name => l_role_name,
903: role_users => NULL);
904:
905: -- Add the users we have identified to the role list.
902: (role_name => l_role_name,
903: role_users => NULL);
904:
905: -- Add the users we have identified to the role list.
906: wf_directory.AddUsersToAdHocRole
907: (role_name => l_role_name,
908: role_users => l_users);
909:
910: ELSE
909:
910: ELSE
911: -- Create an ADHOC role for the approver list and add the
912: -- users.
913: wf_directory.CreateAdHocRole
914: (role_name => l_role_name,
915: role_display_name => l_role_display,
916: role_users => l_users,
917: expiration_date => NULL);