Go Directly To
Oracle Technology Network Community
My Oracle Support Community
OPN Cloud Connection
Oracle Employee Community
Oracle User Group Community
OTN Speaker Bureau
Get Started Guide
Join the world’s largest interactive community dedicated to Oracle technologies.
Learn from thousands of community experts
Get answers to your technical questions
Share your knowledge with peers
Please enter a title.
You can not post a blank message. Please type your message and try again.
This discussion is archived
on Feb 16, 2013 4:17 PM by user9212679
OIM11GR2 sample code to publish roles to an organization
Feb 16, 2013 4:45 AM
I am writing a code to create and update roles in OIM. I am not able to find way to implement the role organization mapping. can anybody tell me which class or interface or any specific method can help me ??
I have the same question
Show 0 Likes
This content has been marked as final.
Show 1 reply
Re: OIM11GR2 sample code to publish roles to an organization
Feb 16, 2013 4:17 PM
in response to
you can create the role by using the following code :
tcGroupOperationsIntf groupManager = getService(tcGroupOperationsIntf.class);
Map attributes = new HashMap();
attributes.put("Groups.Group Name", "Role Name");
attributes.put("Groups.Role Description", "Just for testing");
long groupKey = groupManager.createGroup(attributes);
System.out.println("Group key: " + groupKey);
and below code to modify the role :
RoleManager service = getService(RoleManager.class);
Role role = new Role("24");
role.setAttribute("Role Owner Key", 1L);
RoleManagerResult result = service.modify(role);