— Script to Create oracle workflow ad hoc roles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
DECLARE lv_role varchar2(100) := ‘ERPSCHOOLS_DEMO_ROLE’; lv_role_desc varchar2(100) := ‘ ERPSCHOOLS_DEMO_ROLE’; BEGIN wf_directory.CreateAdHocRole(lv_role, lv_role_desc, NULL, NULL, ‘Role Demo for erpschool users’, ‘MAILHTML’, ‘NAME1 NAME2’, –USER NAME SHOULD BE IN UPPER CASE NULL, NULL, ‘ACTIVE’, NULL); commit; dbms_output.put_line(‘Created Role’ ||’ ‘||lv_role); End; / |
— Script to Add user to already existing Adhoc Role
1 2 3 4 5 6 7 8 9 10 |
DECLARE v_role_name varchar2(100); v_user_name varchar2(100); BEGIN v_role_name := ‘ERPSCHOOLS_DEMO_ROLE’; v_user_name := ‘NAME3’; –USER NAME SHOULD BE IN UPPER CASE WF_DIRECTORY.AddUsersToAdHocRole(v_role_name, v_user_name); –USER NAMES SHOULD BE in CAPS commit; END; / |
— Script to Remove user from existing Adhoc Role
1 2 3 4 5 6 7 8 9 10 |
DECLARE v_role_name varchar2(100); v_user_name varchar2(100); BEGIN v_role_name := ‘ERPSCHOOLS_DEMO_ROLE’; v_user_name := ‘NAME3’; –USER NAME SHOULD BE IN UPPER CASE WF_DIRECTORY.RemoveUsersFromAdHocRole(v_role_name, v_user_name); –USER NAMES in CAPS commit; END; / |
— workflow ad hoc Role Tables
1 2 3 4 5 6 |
select * from WF_ROLES; select * from WF_USER_ROLES; select * from WF_LOCAL_ROLES; select * from WF_USER_ROLE_ASSIGNMENTS; |
Incase of any issues with Roles try running the below concurrent programs.
1. Workflow Directory Services user/Role Validation
2. Synchronize WF LOCAL tables
We will be able to find the roles in “User Management” as shown in the below image.
Learn about Role management from "User Management" Responsibility here http://erpschools.com/articles/sysadmin-and-aol/user-management-role-categories-roles-indirect-responsibilities