Common Registration Activities

Registration" activities are those Operation activities that are commonly used in provisioning workflows, such as the "CreatePerson" and "CreateAccount" workflows. This topic provides a brief overview of these activities and the notable properties associated with each.

As Operation activities, the activities discussed in this topic execute code to create or manipulate objects in EmpowerID. Theses activities have both general properties that are common to all Operation activities, as well as a number of activity-specific properties, also known as "Dependency properties." Dependency properties are properties that can bound from one activity to another for maintaining the consistency of workflow data at runtime.


See Common Workflow Activities for discussion of the general properties associated with Operation activities.


CreatePersonOperation Activity

The CreatePersonOperation activity is an Operation activity used in workflows where a person can be provisioned. Stock workflows include the CreatePerson and CreatePersonAndAccount workflows.

Activity Properties

PropertyCategoryTypeDescription
TargetPeopleTList of Person ComponentsInputSpecifies the person or people on the Operation approval form.
Form_TargetPersonPerson ComponentInputSpecifies the person on the Operation approval form. Used when a single person is being created.
TargetOrgRoleOrgZoneOrgRoleOrgZoneInputSets the Primary Business Role and Location specified in the workflow for each person being created.
PasswordStringInputSets the password for the person being created, if one is specified in the workflow.
CreatePrivAccountPersonInputUsed by the activity to create a privileged Active Directory account, if one is specified in the workflow. Relevant for the CreatePersonAndAccount activity.
CreatePrivilegedPersonBooleanInputSpecifies 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.

CreateAccountOperation Activity

The Create Account activity is an Operation activity used in workflows where a user account can be provisioned. Stock workflows include the CreateAccount and CreatePersonAndAccount workflows.

Activity Properties

PropertyTypeCategoryDescription
TargetAccountsTList of Account ComponentsInputSpecifies the account or accounts on the Operation approval form.
PasswordStringInputSets the password for the person being created if one is specified in the workflow.

AddAccountsToGroupOperation Activity

The Add Accounts to Group activity is an Operation activity used in workflows where one or more accounts are being added to one or more groups. Stock workflows include the AssignPersonResourceRole workflow.

Activity Properties

PropertyTypeCategoryDescription
TargetAccountAccount ComponentInput

Specifies the account that is being added to the group or groups.

var targetAccount = C.Account.GetByAccountID(386);
AddAccountsToGroupsRequest.TargetAccount = targetAccount;
TargetAccountsTList of Account ComponentsInput

Specifies one or more accounts that are being added to the selected group or groups.


var accView = C.AccountView.Get("AccountManagerPersonID=349", "AccountID");
var accList = new E.Tlist<C.Account>();
if(accView.Count > 0)
{
    foreach(var acc in AccView)
    {
        accList.Add(acc.ToAccount());
    }
}
AddAccountsToGroupRequest.TargetAccounts = accList;
TargetGroupGroup ComponentInput

Specifies the group to which one or more accounts are being added.


var targetGroup = C.Group.GetByGroupID(70);
AddAccountsToGroupsRequest.TargetGroup = targetGroup;
TargetGroupsTList of Group ComponentsInput

Specifies the group or groups to which one or more accounts are being added.


var grpView = C.GroupView.Get("IsHighSecurityGroup = 1", "GroupID");
var grpList = new E.Tlist<C.Group>();
if(grpView.Count > 0){
   foreach(var grp in grpView){
     grpList.Add(grp.ToGroup());
   }
}
AddAccountsToGroupRequest.TargetGroups = grpList;
GroupsTList of Group ComponentsInputSpecifies the group or groups to which one or more accounts are being added.
RBACAssignedBooleanInputSpecifies 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.
TargetGroupAccountsTList of GroupAccount ComponentsInputSpecifies the group or groups to which one or more accounts are being added.
TimeConstrainBooleanInput

Specifies whether the groups membership is limited to a specific period of time.


var timeConstrain = CurrentWorkflow.TimeConstrain;
timeConstrain = new TimeConstrain();
timeConstrain.ValidFrom.Add(DateTime.Now);
timeConstrain.ValidTo.AddMonths(6);


CreateGroupOperation Activity

Activity Properties

The CreateGroupOperation activity is used in workflows where one or more groups need to be created. Stock workflows include the CreateGroup and CreateGroupBulk workflows, among others. A simple code example follows.

PropertyTypeCategoryDescription
TargetGroupsList of Group ComponentsInputThis is the list of groups to be created. Can be either a single group or more than one.
TargetAccountStoreAccountStore ComponentInputThis specifies the account store in which the group or groups are to be created.
AssignCreatorAsOwnerBooleanInputSpecifies 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. Stock workflows include the CreatePerson, ResetPassword and HelpDeskPasswordReset workflows, among others.

Activity Properties

PropertyTypeCategoryDescription
EmailMessageIDInt16InputThis is the ID for an existing EmailMessage that is stored in the EmpowerID database. If set to 0, no existing EmailMessage is being used.
DefaultEmailBodyStringInput

Specifies the body of the email messages 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 in to the activity.


var email = this.CurrentWorkflow.SendEmailActivity;
var targetPerson = this.CurrentWorkflow.TargetPerson;
email.DefaultEmailBody = string.Format("Welcome to the organization {0, 1}!", 
targetPerson.FirstName + " " + targetPerson.LastName)";
DefaultEmailSubjectStringInputSpecifies the subject of the email messages 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 in to the activity.


var email = this.CurrentWorkflow.SendEmailActivity;
email.DefaultEmailSubject = "Welcome Aboard"
PeopleToEmailTList of PersonsInputList of people to email. Includes TargetPerson, TargetPeople, TargetManagementRole and TargetManagementRoles.
FromEmailStringInputSpecifies 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.


var email = this.CurrentWorkflow.SendEmailActivity;
email.FromEmail = "captainjack@acmeanvils.com"
AdditionalEmailsStringInputSpecifies any additional email addresses in which to send the email.


var email = this.CurrentWorkflow.SendEmailActivity;
email.AdditionalEmails = "captainjack@acmeanvils.com"

In this article