Type Converters allow you to convert one data type to another within a workflow. An example of using a type converter would be converting the login name of a Person (string) to PersonID (integer). This article demonstrates using a type converter in this way.
Adding a type converter to a workflow
Open the workflow to which you want to add a type converter
Right-click on the Workflow Designer and select Workflow Binding Type Converters.
Name the Type Converter appropriately and click Add.
Click Close to close the Type Converters window.
Locate the class for the Type Converter in the Code Tree and double-click on the ConvertTo() method to open the C# Editor for it.
In the C# Editor, replace the default code for the method with code that retrieves a value of type string and returns a value of type int. In this example, we specifically, enter code to do the following:
Retrieve the Person object by the login name passed to the type converter
Return the PersonID from the retrieved Person object.
Person p = Person.GetByLogin(value.String()); return p.PersonID;
Now that the policy is created, the next step is to define the conditions needed for users to be added to the policy target. You do this by adding rules to it.
Step 2 - Add Attribute Conditions to the policy
Locate the policy you just created in the Attribute-Based Membership Policies grid and click the Name link for it.
This directs you to the Policy Details (View One) page for the policy.
The page contains a General pane and four accordions for viewing information about the policy and configuring it as needed.Page Element
Purpose
General Panel
Provide general overview about the policy to include the following:
Name – Name of the policy
Is Enabled – Whether the policy is enabled; True or False
Policy Type – Action granted by the policy, such as Member
Auto-Approve – Whether the system approves the action for users meeting the conditions of the policy; True or False
Last Success – Displays the date and time of the last successful compilation of the policy
Last Attempt – Displays the date and time the system last tried to compile the policy
Next Compilation Time – Displays the date and time the system will recompile the policy
Last Error – Displays the last error to occur during compilation, if any
Locked by Server – Displays the EmpowerID server that compiled the policy
Assignee Member Policy ID – GUID of the policy
Attribute Conditions (Field Types)
Accordion that allows you to view and create policy rules that set the attribute conditions needed to be met in order to be added to the target of the policy
Field Type Values for Policy
Accordion that lists the field type values for the policy as specified by the attribute conditions
Attribute-Based Membership Inbox
Accordion that lists users and other EmpowerID actors that meet the conditions specified by the selected field types and have been added to the inbox for processing. The inbox is only populated when the policy is enabled.
Preview Proposed Changes
Accordion that allows you to view what would occur if the policy is enabled.
Expand the Attribute Conditions (Field Types) accordion and click the Add button on the grid header.
Enter the following information in the Dynamic Membership Rule form that appears:
Name – Name of the rule
Right – If the rule defines an application right that needs to be met, search for and select the appropriate right
Field Type (Attribute) – If the rule specifies an application field type that needs to be met, search for and select the appropriate attribute
Field Values Constraints on Right Assignment – If the field type can have multiple values, select the values needed
In the below example, the rule specifies that users need the Data Access right to the Customer field type for Intu.
Save the rule.
Repeat, adding as many rules as needed.
When adding multiple rules to a policy you create an AND condition. In order to qualify for the target, users need to meet all conditions. If you want to create an OR condition where users only need to meet one of multiple conditions, you would need create a separate policy for each condition.
After creating the policy, the system should compile it – and depending on the settings applied – will show matching records in either the Attribute-Based Membership Inbox accordion (when Enabled is set to True and Auto-Approve is set to True) or in the Preview Proposed Changes accordion.