Common User Management Activities

"User Management" activities are those Operation activities that are commonly used in self-service workflows, such as the "ChangePassword" and "Enrollmment" 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.


ChangePasswordOperation Activity

The ChangePasswordOperation activity is an Operation activity used in workflows where people delegated users can change their own passwords. Stock workflows include the ChangePassword and CreatePersonAndAccount workflows.

Activity Properties

PropertyCategoryTypeDescription
CurrentAccountAccountInputGet the current account for the person whose password is being changed.
ShowChangePasswordSummaryBooleanInputSpecifies whether the result of the operation should be shown to the person. Set to true by default.
PasswordChangedBooleanOutoutReturns True if the password is changed. Set to False by default.
ChangedPasswordResultListOutputPassword Action Summary.

Example Usage

//Set reference to Operation
var ChangePasswordOperation = CurrentWorkflow.ChangePasswordRequest;

//Get TargetPerson and CurrentAccount
var TargetPerson = Person.GetCurrentPerson();
var CurrentAccount = Person.GetCurrentAccount();

//Set Operation Properties
ChangePasswordOperation.TargetPerson = TargetPerson;
ChangePasswordOperation.CurrentAccount = CurrentAccount;

EnrollOperation Activity

The EnrollOperation is an Operation activity used in workflows to allow users to enroll in the Self-Service Password Reset Center. Once enrolled, users can reset forgotten passwords by answering a series of challenge questions. The Stock workflow with this activity is the Enrollment workflow.

Activity Properties

PropertyTypeCategoryDescription
TargetPersonPerson ComponentInputThis is the person enrolling for Password Self-Service Reset.
OperationExecutedBooleanFalseSpecifies whether the person successfully enrolled. Set to False by default.

Example Usage

//Set reference to Operation
var EnrollOperation = CurrentWorkflow.Enroll;

//Get TargetPerson
var TargetPerson = Person.GetCurrentPerson();

//Set Operation Properties
EnrollOperation.TargetPerson = TargetPerson;

UnenrollPerson Activity

The UnenrollPerson activity is in workflows to remove people from the Self-Service Password Reset Center. People who unenroll cannot self-service reset forgotten passwords. In the below example, users unenroll themselves.

Activity Properties

PropertyTypeCategoryDescription
TargetPersonPerson ComponentInputThis is the person enrolling for Password Self-Service Reset.
OperationExecutedBooleanFalseSpecifies whether the person successfully enrolled. Set to False by default.

Example Usage

//Set reference to Operation
var UnEnroll = CurrentWorkflow.UnenrollPersonActivity;

//Get TargetPerson
var TargetPerson = Person.GetCurrentPerson();

//Set Activity Properties
UnEnroll.TargetPerson = TargetPerson;

ResetPasswordOperation Activity

The ResetPasswordOperation is an Operation activity used in workflows to allow delegated users the ability to reset the passwords of other people. The Stock workflow with this activity is the ResetPassword workflow.

Activity Properties

PropertyTypeCategoryDescription
TargetPersonPerson ComponentInputThis is the person whose password is being reset.
AdminResetPasswordBooleanInputSpecifies whether the password is being reset for another person rather than a self-service password reset. Set to True by default.
OperationExecutedBooleanOutputSpecifies whether the person's password was successfully reset. Set to False by default.

Example Usage

//Set reference to Operation
var ResetPasswordOperation = CurrentWorkflow.ResetPasswordRequest;

//Get TargetPerson
var TargetPerson = C.Person.GetByPersonID(349);

//Set Operation Properties
ResetPasswordOperation.TargetPerson = TargetPerson;

EditPersonOperation Activity

Activity Properties

The EditPersonOperation is a Multi-Operation Operation activity that is used in workflows to allow delegated users the ability to edit the attributes of another person. The type of attributes that can be edited depend on the operations allowed in workflow usage. The Stock workflow with this activity is the EditPerson workflow.

PropertyTypeCategoryDescription
TargetPeopleList of Person ComponentsInputThis is the person or persons whose attributes are being edited.

In the below example, the Office attribute is being edited, which is under Organization attributes. To allow the operation to succeed, Edit Person Organization Attributes must be enabled on the EditPersonOperation. To enable specific operations on a Multi-Operation Operation activity like EditPersonOperation within a workflow, right-click on the Operation activity, select Enable/Disable Executing Operations from the context menu and then move the operation from the Disabled Operations pane to the Enabled Operations pane.

Example Usage

//Set reference to Operation
var EditPersonOperation = CurrentWorkflow.EditPersonRequest;

//Set the TargetPerson and the attribute being edited
var TargetPerson = C.Person.GetByPersonID(349);
TargetPerson.Office = "Hampton";

//Create a TargetPeople list and add TargetPerson to it
var TargetPeople = new E.TList();
TargetPeople.Add(TargetPerson);

//Set the TargetPeople property on the Operation
EditPersonOperation.TargetPeople = TargetPeople;

UpdatePersonLoginAssociationsOperation Activity

The UpdatePersonLoginAssociationsOperation is a Dual Resource Multi-Operation Operation activity that is used in workflows to add and remove the login associations people have within EmpowerID. Login associations, also known as "persona switching," enables people to log in to EmpowerID as another identity, without requiring them to know the passwords associated with those identities. The Stock workflow with this activity is the Update Person Login Associations workflow.

Activity Properties

PropertyTypeCategoryDescription
TargetAssigneeLoginAssociationTargetAssigneeLoginAssociationInputThis is the login association being created.
TargetAssigneeLoginAssociationsList of TargetAssigneeLoginAssociationInputThis is a list of the login association being created.
TimeConstrainStringInputLimits the login association to a specified time and date range. If a value is not set, the login association has no time limitations.
TimeConstrainActiveBooleanInputSpecifies whether the login association is time constrained. Set to False by default.

In the below example, login associations are being created. As the Operation is a Multi-Operation Operation, to allow the operation to success, Add Assignee Login Association must be enabled on the operation. To enable specific operations on a Multi-Operation Operation activity within a workflow, right-click on the Operation activity, select Enable/Disable Executing Operations from the context menu and then move the operation from the Disabled Operations pane to the Enabled Operations pane.

Example Usage

// Set reference to AddLoginAssociation Operation Activity
var addLoginAssociation = CurrentWorkflow.AddLoginAssociation;
 
// Get GUID of assignee as the UpdatePersonLoginAssociations base expects Guids 
var AssigneeGUID = C.Person.GetByPersonID(223).PersonGUID;
 
// Create a list of guids for allowed person logins
var allowedLoginGUIDs = new List<Guid>();
 
// Create a view that returns all people for allowed logins
// In this example, we are returning everyone with an Office of Hampton
E.VList<C.PersonView> pView = C.PersonView.Get("Office = 'Hampton'", "Name Desc");

// Create a new list of Person components for allowed logins
var allowedLogins = new List<C.Person>();

// Convert the people in the view to components
foreach(var per in pView)
{
     allowedLogins.Add(per.ToPerson());
}

// Add each person's PersonGUID to allowedLoginGUIDS 
foreach (var p in allowedLogins)
{
     allowedLoginGUIDs.Add(p.PersonGUID);
}

// Create new list of AssigneeLoginAssociation
List<C.AssigneeLoginAssociation> assigneesToAdd = new List<C.AssigneeLoginAssociation>(); 

 // Create a new AssigneeLoginAssociation for each allowed login
foreach(Guid g in allowedLoginGUIDs)
{
        C.AssigneeLoginAssociation ala = new C.AssigneeLoginAssociation();
        ala.AssigneeID = AssigneeGUID;
        ala.AllowedLoginPersonID = g;
        assigneesToAdd.Add(ala);
}

// Set the Operation activity's TargetAssigneeLoginAssocations property
addLoginAssociation.TargetAssigneeLoginAssociations = assigneesToAdd;
In this article