Fuego.Fdi : DirOrganizationalRole

The DirOrganizationRole component is used to create Organizational Roles in the Directory, and retrieve information about Organizational Roles in the Directory.

A role in the organization is a title or job function that is associated to a set of activities performed by participants of the organization.

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

Example 1

The following example creates Organizational Roles in the Directory:

session = Fuego.Fdi.DirectorySession.currentEngineSession

// Create a regular role 
organizerRole = DirOrganizationalRole.create(session : session,
                  name : "event_organizer",
                  isParametric : false,
                  description : "This is a regular Role",
                  parametricValues : [])

attendeeRole = DirOrganizationalRole.create(session : session,
                  name : "attendee",
                  isParametric : true,
                  description : "This is a parametric Role",
                  parametricValues : ["VIP", "Regular", "Individual"])

Example 2

The following example loads and updates an existing Role:

session = Fuego.Fdi.DirectorySession.currentEngineSession
attendeeRole = DirOrganizationalRole.fetch(session : session,
                           id : "attendee" )

// Add a parameter value to this parametric role
attendeeRole.parametricValues[] = "Presenter"

// Associate a custom property with this role:
storeProperty attendeeRole
	    using category = "1",
	    key = "max_occupancy",
	    value = 1200
 
update paramRole

Example 3

The following example iterates through all Participants that are assigned to a role:

session = Fuego.Fdi.DirectorySession.currentEngineSession
attendeeRole = DirOrganizationalRole.fetch(session : session,
                                           id : "attendee" )

parts = fetchAssignedParticipants(attendeeRole)
for each p in parts do
	logMessage "Attendee: +" p.displayName +"("+p.i+")"
end
Related reference
Fuego.Fdi : DirHumanParticipant
Fuego.Fdi : DirOrganizationalGroup
Fuego.Fdi : DirOrganizationalUnit
Fuego.Fdi : DirectorySession
Fuego.Fdi : RoleAssignment