Code-based Sets are queries that can result in collections of people or collections of other resource types protected by EmpowerID. Each code-based Set requires a Set Runtime, which is a custom implementation of the EmpowerID API that allows C# code to be used to return a collection of EmpowerID object types. This topic walks you through the process.
Opens the C# Editor stubbed for the new Set Runtime in the Document Space, ready for you to add custom code.
Adds the HelpdeskTechnicians.cs class file to the Classes folder in the Code Tree (in the Toolbox to the right).
All Set Runtime objects you create in Workflow Studio use the GetResults() method of the ISetRuntime interface in the TheDotNetFactory.Framework.People.Components namespace. |
The following image shows the new Helpdesk Technicians Set Runtime in Workflow Studio.
int totalCount = -1; E.TList<Person> people = Person.Find ("Title = Helpdesk Technician", 0, int.MaxValue, out totalCount); E.TList<SetCompilation> results = new E.TList<SetCompilation>(); foreach (Person p in people) { results.Add(new SetCompilation(){SystemIdentifier = p.PersonGUID.ToString(),DisplayName = p.FriendlyName}); } return results; |
If you use LINQ to return results, the SELECT statement cannot contain any characters that XML does not escape:
|
Enter the desired parameters for the compilation schedule and then click OK.
At this point, the Add Set dialog looks similar to this.
To use a code-based Set in any RBAC scenario, you must pair it with a SetGroup. |
|
|