Common Registration Activities
Registration activities are Operation activities commonly used in provisioning workflows for creating and managing user identities, accounts, and groups. This reference guide covers the key activities used in workflows such as CreatePerson, CreateAccount, and related provisioning processes.
For an overview of Operation activities and how they work, see Activities Concepts. For detailed information about Operation activity properties, see Common Workflow Activity Types.
About Registration Activities
As Operation activities, registration activities execute code to create or manipulate objects in EmpowerID with built-in authorization checks. These activities have both general properties common to all Operation activities, as well as activity-specific properties (also known as "Dependency properties") that can be bound from one activity to another for maintaining workflow data consistency at runtime.
The activities covered in this guide include:
- CreatePersonOperation - Creates new person identities
- CreateAccountOperation - Provisions user accounts
- AddAccountsToGroupOperation - Manages group memberships
- CreateGroupOperation - Creates security and distribution groups
- SendEmail - Sends notification emails during provisioning workflows
CreatePersonOperation Activity
The CreatePersonOperation activity is an Operation activity used in workflows where a person can be provisioned. Stock workflows include CreatePerson and CreatePersonAndAccount.
Activity Properties
| Property | Category | Type | Description |
|---|---|---|---|
| TargetPeople | Input | TList of Person Components | Specifies the person or people on the Operation approval form. |
| Form_TargetPerson | Input | Person Component | Specifies the person on the Operation approval form. Used when a single person is being created. |
| TargetOrgRoleOrgZone | Input | OrgRoleOrgZone | Sets the Primary Business Role and Location specified in the workflow for each person being created. |
| Password | Input | String | Sets the password for the person being created, if one is specified in the workflow. |
| CreatePrivAccount | Input | Person | Used by the activity to create a privileged Active Directory account, if one is specified in the workflow. Relevant for the CreatePersonAndAccount activity. |
| CreatePrivilegedPerson | Input | Boolean | Specifies whether the person being created is a privileged person. This evaluates to true when the Active Directory user account being provisioned is a privileged account. |
Example Usage
// Create a new person
var targetPerson = new C.Person();
targetPerson.FirstName = "John";
targetPerson.LastName = "Doe";
targetPerson.Email = "john.doe@company.com";
// Set business role and location
var orgRoleOrgZone = C.OrgRoleOrgZone.GetByOrgRoleOrgZoneID(12345);
// Pass to the operation activity
CurrentWorkflow.CreatePersonOperation.Form_TargetPerson = targetPerson;
CurrentWorkflow.CreatePersonOperation.TargetOrgRoleOrgZone = orgRoleOrgZone;
CreateAccountOperation Activity
The CreateAccountOperation activity is an Operation activity used in workflows where a user account can be provisioned. Stock workflows include CreateAccount and CreatePersonAndAccount.
Activity Properties
| Property | Category | Type | Description |
|---|---|---|---|
| TargetAccounts | Input | TList of Account Components | Specifies the account or accounts on the Operation approval form. |
| Password | Input | String | Sets the password for the account being created if one is specified in the workflow. |
Example Usage
// Create a new account
var targetAccount = new C.Account();
targetAccount.AccountName = "jdoe";
targetAccount.FriendlyName = "John Doe";
targetAccount.AccountStoreID = 1001;
// Add to list and pass to operation
var accountList = new E.TList<C.Account>();
accountList.Add(targetAccount);
CurrentWorkflow.CreateAccountOperation.TargetAccounts = accountList;
CurrentWorkflow.CreateAccountOperation.Password = "SecureP@ssw0rd!";
AddAccountsToGroupOperation Activity
The AddAccountsToGroupOperation activity is an Operation activity used in workflows where one or more accounts are being added to one or more groups. Stock workflows include AssignPersonResourceRole.
Activity Properties
| Property | Category | Type | Description |
|---|---|---|---|
| TargetAccount | Input | Account Component | Specifies the account that is being added to the group or groups.csharp<br />var targetAccount = C.Account.GetByAccountID(386);<br />AddAccountsToGroupsRequest.TargetAccount = targetAccount;<br /> |
| TargetAccounts | Input | TList of Account Components | Specifies one or more accounts that are being added to the selected group or groups.csharp<br />var accView = C.AccountView.Get("AccountManagerPersonID=349", "AccountID");<br />var accList = new E.TList<C.Account>();<br />if(accView.Count > 0)<br />{<br /> foreach(var acc in accView)<br /> {<br /> accList.Add(acc.ToAccount());<br /> }<br />}<br />AddAccountsToGroupRequest.TargetAccounts = accList;<br /> |
| TargetGroup | Input | Group Component | Specifies the group to which one or more accounts are being added.csharp<br />var targetGroup = C.Group.GetByGroupID(70);<br />AddAccountsToGroupsRequest.TargetGroup = targetGroup;<br /> |
| TargetGroups | Input | TList of Group Components | Specifies the group or groups to which one or more accounts are being added.csharp<br />var grpView = C.GroupView.Get("IsHighSecurityGroup = 1", "GroupID");<br />var grpList = new E.TList<C.Group>();<br />if(grpView.Count > 0){<br /> foreach(var grp in grpView){<br /> grpList.Add(grp.ToGroup());<br /> }<br />}<br />AddAccountsToGroupRequest.TargetGroups = grpList;<br /> |
| Groups | Input | TList of Group Components | Specifies the group or groups to which one or more accounts are being added. |
| RBACAssigned | Input | Boolean | Specifies whether the account group membership is linked to each EmpowerID Person owning the accounts being added. This allows the group membership to be controlled on the EmpowerID Person. Set to True by default. |
| TargetGroupAccounts | Input | TList of GroupAccount Components | Specifies the group or groups to which one or more accounts are being added. |
| TimeConstrain | Input | Boolean | Specifies whether the group membership is limited to a specific period of time.csharp<br />var timeConstrain = CurrentWorkflow.TimeConstrain;<br />timeConstrain = new TimeConstrain();<br />timeConstrain.ValidFrom.Add(DateTime.Now);<br />timeConstrain.ValidTo.AddMonths(6);<br /> |
CreateGroupOperation Activity
The CreateGroupOperation activity is used in workflows where one or more groups need to be created. Stock workflows include CreateGroup and CreateGroupBulk.
Activity Properties
| Property | Category | Type | Description |
|---|---|---|---|
| TargetGroups | Input | List of Group Components | This is the list of groups to be created. Can be either a single group or more than one. |
| TargetAccountStore | Input | AccountStore Component | This specifies the account store in which the group or groups are to be created. |
| AssignCreatorAsOwner | Input | Boolean | Specifies whether the initiator of the workflow should be assigned as the owner of the group being created. |
Example Usage
// Set the location for the group
var targetOrgZone = C.OrgZone.GetByOrgZoneID(11073);
// Instantiate a new group
var targetGroup = new C.Group();
// Set group properties
targetGroup.AccountStoreID = 1001;
targetGroup.Name = "BK-207-WynDot2"; // Required field
targetGroup.FriendlyName = "WynDot Users";
targetGroup.LogonName = "BK-207-WynDot2";
targetGroup.Description = "WynDot Users Group";
targetGroup.GroupTypeID = 1; // Required field
// Instantiate a new list of groups and add TargetGroup to it
var targetGroups = new E.TList<C.Group>();
targetGroups.Add(targetGroup);
// Add properties to the CreateGroupOperation
CurrentWorkflow.CreateGroupRequestOperation.TargetGroups = targetGroups;
CurrentWorkflow.CreateGroupRequestOperation.TargetOrgZone = targetOrgZone;
CurrentWorkflow.CreateGroupRequestOperation.ShowExecutionMessage = false; // Keeps the Operation Execution Summary from showing
SendEmail Activity
The SendEmail activity is used in workflows where email notifications need to be sent during provisioning processes. This activity is commonly used alongside registration activities to notify users, managers, or administrators about account creation, password resets, and other provisioning events. Stock workflows include CreatePerson, ResetPassword, and HelpDeskPasswordReset.
Activity Properties
| Property | Category | Type | Description |
|---|---|---|---|
| EmailMessageID | Input | Int16 | This is the ID for an existing EmailMessage that is stored in the EmpowerID database. If set to 0, no existing EmailMessage is being used. |
| DefaultEmailBody | Input | String | Specifies the body of the email message being sent. If an existing EmailMessage is being used, the default email body is set from the EmailMessage. Otherwise, set this value and pass it to the activity.csharp<br />var email = this.CurrentWorkflow.SendEmailActivity;<br />var targetPerson = this.CurrentWorkflow.TargetPerson;<br />email.DefaultEmailBody = string.Format("Welcome to the organization {0}!", <br /> targetPerson.FirstName + " " + targetPerson.LastName);<br /> |
| DefaultEmailSubject | Input | String | Specifies the subject of the email message being sent. If an existing EmailMessage is being used, the default email subject is set from the EmailMessage. Otherwise, set this value and pass it to the activity.csharp<br />var email = this.CurrentWorkflow.SendEmailActivity;<br />email.DefaultEmailSubject = "Welcome Aboard";<br /> |
| PeopleToEmail | Input | TList of Persons | List of people to email. Includes TargetPerson, TargetPeople, TargetManagementRole and TargetManagementRoles. |
| FromEmail | Input | String | Specifies the From address of the email message. Set by default to the FromEmail configuration settings specified in EmpowerID. Otherwise, set this value and pass it to the activity.csharp<br />var email = this.CurrentWorkflow.SendEmailActivity;<br />email.FromEmail = "noreply@company.com";<br /> |
| AdditionalEmails | Input | String | Specifies any additional email addresses to which to send the email.csharp<br />var email = this.CurrentWorkflow.SendEmailActivity;<br />email.AdditionalEmails = "hr@company.com,manager@company.com";<br /> |
Example Usage
// Configure email notification for new user
var email = CurrentWorkflow.SendEmailActivity;
var newPerson = CurrentWorkflow.TargetPerson;
// Set email properties
email.DefaultEmailSubject = "Welcome to the Organization";
email.DefaultEmailBody = string.Format(
"Hello {0},\n\nYour account has been created successfully.\n\nUsername: {1}\n\nBest regards,\nIT Department",
newPerson.FriendlyName,
newPerson.PrincipalName
);
email.FromEmail = "it-support@company.com";
email.PeopleToEmail = new E.TList<C.Person> { newPerson };
// Optionally notify manager
if (newPerson.Manager != null)
{
email.AdditionalEmails = newPerson.Manager.Email;
}
Related Resources
- Common Workflow Activity Types - Complete reference for all activity types and properties
- Activities Concepts - Architectural overview of activities in workflows
- Your First Workflow - Hands-on tutorial creating a workflow with activities
- Creating Operation Workflows - Tutorial for building operation workflows