Fuego.Fdi : DirOrganizationalGroup

The DirOrganizationalGroup creates and retrieves information from Organizational Groups that are defined in the Oracle BPM Directory.

Groups are collections of roles. By assigning a participant to a group, you are indirectly assigning the participant to all roles in that group. Groups may also contain other groups.

You can associate any data with a particular group by using the DirOrganizationalGroup.store*Property() set of methods. To retrieve previously stored data, use the DirOrganizationalGroup.retrieve*Property() set of methods.

Example 1

The following example creates a new Organizational Group in the Directory:

session = Fuego.Fdi.DirectorySession.currentEngineSession
 
// Create an Organizational Group with assigned Participants and other groups.
newGroup = DirOrganizationalGroup.create(session : session,
	 name : "new_group",
	 description : "New Example Group",
	 assignedParticipants : ["Part1"],
	 assignedGroups : ["Group2"],
	 allowRolesAssigned : true,
	 enabled : true)

Example 2

The following example updates an existing Organizational Group:

session = Fuego.Fdi.DirectorySession.currentEngineSession

newGroup = DirOrganizationalGroup.fetch( session : session,
                                         id : "new_group" )
	                                 

// Ensure role "AllUsers" is assigned to the Group
if not hasRoleAssigned(newGroup, role : "AllUsers") then

    allUsersRole = DirOrganizationalRole.fetch(session : session, id : "AllUsers")
    newRoleAssignment[] = RoleAssignment.create(role : allUsersRole, permissions : 255)
    newGroup.rolesAssignment[]  = newRoleAssignment
     
    // Save changes
    update newGroup 
end
Related reference
Fuego.Fdi : DirHumanParticipant
Fuego.Fdi : DirOrganizationalRole
Fuego.Fdi : DirOrganizationalUnit
Fuego.Fdi : DirectorySession
Fuego.Fdi : RoleAssignment