Object Model Quick Start

The Workflow Studio object model or API provides you with all the tools necessary for programmatic access to organizational data, allowing you to view and manipulate each object protected by the EmpowerID Identity Warehouse. In this way, you can create your own custom applications, workflows, activities, and services to allow clients to view and manipulate that data.

Workflow Studio provides an Object Browser to allow you to view the namespaces and members of those namespaces that make up the EmpowerID object model. You can access the Object Browser in Workflow Studio by clicking the Object Browser button on the Common tab of the Workflow Studio ribbon.

Working with Person Objects

In EmpowerID, a person is an object in the EmpowerID SQL-based Identity Warehouse that links together the user accounts, permissions assignments, audit history, and management policies associated with an identity. The EmpowerID Person is the base identity in the EmpowerID RBAC model and is necessary for accessing resources and performing tasks in EmpowerID. The Workflow Studio object model contains two namespaces with multiple classes for working with people in EmpowerID — the People.Components namespace and the People.Entities namespace. Each of these namespaces have classes corresponding to each of the object tables in the EmpowerID Identity Warehouse. You can use the members of these classes to directly interact with the data in the Identity Warehouse. The following examples demonstrate some of the more common use cases.

Required Namespaces

When working with Person objects, minimally you should add references to the following namespaces

using TheDotNetFactory.Framework; using TheDotNetFactory.FrameWork.Common; using TheDotNetFactory.FrameWork.Common.Shared; using TheDotNetFactory.Framework.Core; using C = TheDotNetFactory.Framework.People.Components; using E = TheDotNetFactory.Framework.People.Entities;

Get by Job Title

string columnsToSearch = "Title"; string textToSearch = "Helpdesk"; var pageLength = 500; int totalCount; E.VList<C.PersonView> p = C.PersonView.GetAllSearch(columnToSearch, textToSearch, 1, pageLength, out totalCount); //Write the results to the console foreach(var a in p) Console.WriteLine("Name: {0}, Login: {1}, PersonID: {2}", a.Name, a.Login, a.PersonID);

Create a new Person object

C.Person p = new C.Person(); p.LastName = "Simone"; p.FirstName = "John"; p.Name = "John Simone"; p.Active = true; p.AllowLogin = true; p.Login = "jSimone"; //Add the person object to the Identity Warehouse p.Insert();

Get People without Accounts

Execute Account RETs

Change the primary Business Role and Location

Disable a Person

Reset a Person's Password

Unlock a Person

Get Access Assignments

Get People in Management Role

Get a Person's Management Role

Get People in Business Role and Location

Get People in a Group

Get a Person's Group memberships

Check specific access to a resource

Check all access to a resource

Get People able to execute an operation against a resource

Get all operations executed by a Person

Working with User Accounts

In EmpowerID, user accounts are Identity Warehouse objects that represent the user accounts in external account stores, such as Active Directory or Office 365. User accounts are generally linked to EmpowerID Person objects, and as such, any actions performed against an account can affect the Person objects to which they are linked and vice-versa. As with the EmpowerID Person, the Workflow Studio object model contains two namespaces with multiple classes for working with accounts in EmpowerID—the People.Components namespace and the People.Entities namespace.

Required Namespaces

When working with Account objects, minimally you should add references to the following namespaces:

Create an account and a Person linked to the account

Move an account

Add an account to a group

Restore deleted accounts

Join an account to a Person

Remove an account from a Person

Unlock all locked accounts

Working with random objects

Create mailbox for user

Create an Audit Log entry

Tracing

How to use the rawmarkup control and then set the value in a WF to a localized message

Rawmarkup form control - read-only - doublewide

Set value on activity in code

Retrieve a Global EmpowerID System Config Setting

How to fire one of the older style alerts

Get list of operations person has for a resource

Check and return true if person has a specific operation for a resource

Check if person can do operation for resource

Check if approver decision was approved (old collaboration task engine - not business requests)

Check if a Person can run the Workflow (WF)

Taking a list of heavy person objects and creating a light list of person objects with IDs