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.
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
Property | Category | Type | Description |
---|
TargetPeople | TList of Person Components | Input | Specifies the person or people on the Operation approval form. |
Form_TargetPerson | Person Component | Input | Specifies the person on the Operation approval form. Used when a single person is being created. |
TargetOrgRoleOrgZone | OrgRoleOrgZone | Input | Sets the Primary Business Role and Location specified in the workflow for each person being created. |
Password | String | Input | Sets the password for the person being created, if one is specified in the workflow. |
CreatePrivAccount | Person | Input | Used by the activity to create a privileged Active Directory account, if one is specified in the workflow. Relevant for the CreatePersonAndAccount activity. |
CreatePrivilegedPerson | Boolean | Input | 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. |
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
Property | Type | Category | Description |
---|
TargetAccounts | TList of Account Components | Input | Specifies the account or accounts on the Operation approval form. |
Password | String | Input | Sets 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
Property | Type | Category | Description |
---|
TargetAccount | Account Component | Input | Specifies the account that is being added to the group or groups.
Code Block |
---|
| var targetAccount = C.Account.GetByAccountID(386);
AddAccountsToGroupsRequest.TargetAccount = targetAccount; |
|
TargetAccounts | TList of Account Components | Input | Specifies one or more accounts that are being added to the selected group or groups.
Code Block |
---|
| 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; |
|
TargetGroup | Group Component | Input | Specifies the group to which one or more accounts are being added.
Code Block |
---|
| var targetGroup = C.Group.GetByGroupID(70);
AddAccountsToGroupsRequest.TargetGroup = targetGroup; |
|
TargetGroups | TList of Group Components | Input | Specifies the group or groups to which one or more accounts are being added.
Code Block |
---|
| 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; |
|
Groups | TList of Group Components | Input | Specifies the group or groups to which one or more accounts are being added. |
RBACAssigned | Boolean | Input | 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 | TList of GroupAccount Components | Input | Specifies the group or groups to which one or more accounts are being added. |
TimeConstrain | Boolean | Input | Specifies whether the groups membership is limited to a specific period of time.
Code Block |
---|
| 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.
Property | Type | Category | Description |
---|
TargetGroups | List of Group Components | Input | This is the list of groups to be created. Can be either a single group or more than one. |
TargetAccountStore | AccountStore Component | Input | This specifies the account store in which the group or groups are to be created. |
AssignCreatorAsOwner | Boolean | Input | Specifies whether the initiator of the workflow should be assigned as the owner of the group being created. |
Example Usage
Code Block |
---|
|
//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
Property | Type | Category | Description |
---|
EmailMessageID | Int16 | Input | 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 | String | Input | 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.
Code Block |
---|
| var email = this.CurrentWorkflow.SendEmailActivity;
var targetPerson = this.CurrentWorkflow.TargetPerson;
email.DefaultEmailBody = string.Format("Welcome to the organization {0, 1}!",
targetPerson.FirstName + " " + targetPerson.LastName)"; |
|
DefaultEmailSubject | String | Input | Specifies 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.
Code Block |
---|
| var email = this.CurrentWorkflow.SendEmailActivity;
email.DefaultEmailSubject = "Welcome Aboard" |
|
PeopleToEmail | TList of Persons | Input | List of people to email. Includes TargetPerson, TargetPeople, TargetManagementRole and TargetManagementRoles. |
FromEmail | String | Input | 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.
Code Block |
---|
| var email = this.CurrentWorkflow.SendEmailActivity;
email.FromEmail = "captainjack@acmeanvils.com" |
|
AdditionalEmails | String | Input | Specifies any additional email addresses in which to send the email.
Code Block |
---|
| var email = this.CurrentWorkflow.SendEmailActivity;
email.AdditionalEmails = "captainjack@acmeanvils.com" |
|