Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the workflow to which you want to add a type converter

  2. Right-click on the Workflow Designer and select Workflow Binding Type Converters.

  3. Name the Type Converter appropriately and click Add.

  4. Click Close to close the Type Converters window.

  5. 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.

  6. 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:  

    1. Retrieve the Person object by the login name passed to the type converter

    2. Return the PersonID from the retrieved Person object.

    Code Block
    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.

...


...

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.

    Image Removed

...

Save the rule.

...

Repeat, adding as many rules as needed.

Info

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.

...

  1. The below image shows what the code looks like in the editor.

    Image Added

  2. Click the External Rules tab located above the C# Editor and expand the Business Rule Engine tree to locate the property you need to convert to the new data type.

    Image Added

  3. Drag the type converter from the Code Tree onto the node for the property you need to convert.

    Image Added


    This binds the Converter to the property.

    Image Added