Configure Approval Rule Sets and Rules

Rule sets and rules control how a workflow task is routed, assigned, and completed, based on specific conditions. For example, a rule can say that transactions over a certain amount must have approvals up three levels in the management chain.

A workflow task has one or more rule sets, and a rule set has one or more rules. At run time, if a rule set has multiple rules, all the rules are evaluated at the same time. A rule has two parts, an If section that has the conditions, or tests, and a Then section that has the actions to take when the conditions are met.

Configure Rule Sets

First, create or find the rule set you want to work on:

  1. In the Setup and Maintenance work area, go to the Manage Task Configurations task in the Application Extensions functional area. Or, depending on your offering, you might use a different functional area or another approval setup task.

  2. In BPM Worklist, on the Task Configuration tab, search for the workflow task in the Tasks to be configured pane.

  3. Select the task from the search results and click the Edit task icon in the toolbar.

    Note: You may see a message saying that flexfields have been modified. This means someone used Application Composer to create new fields, which creates flexfields on the back end. Click the Start Synchronization button to get the latest set of flexfields that you can use for the rules in this task.
  4. Click the Assignees subtab.

  5. If the diagram mapping out the workflow task is big, click the Switch to Vertical Layout link.

  6. In the diagram, find the participant you want to work on. Click the Go to rule icon and select Go to rule. Or, select the participant and, in the pane after the diagram, click the link in the Business rule field.

  7. Go on to work on the rule set that's displayed on the Rules tab. Or, from the drop-down list with rule set names, select another rule set to edit, or select Add New Rule Set.

  8. Click the View Properties link after the rule set name to see the Effective Date setting and Active check box. The rule set needs to be effective and active to apply when people create workflow tasks. It's a good idea to leave the effective date set to Always.

    Caution: From here, you can also click the Delete Rule Set link. Before you delete any predefined rule sets, make sure you’re really not using it and never will. Don’t delete the predefined Modification Rules and Substitution Rules rule sets.
  9. In the Rules pane, you can add, edit, or delete rules in the rule set. Expand the rule if it's not already. As with the rule set, you can click the Show Advanced Settings icon for a rule to make sure that the rule is effective and active.

    • Create: Click the Advanced Add or Modify Options icon and select General Rule.
    • Edit: Select the rule if it's not already.
    • Delete: Select the rule and click the Delete icon in the toolbar in the Rules pane.

    For the rule you’re creating or editing, you can click the Properties link after the rule name to rename the rule and make sure that the rule is effective and active.

Here's a screenshot to help us understand what we see in the Rules subtab on the Assignees tab:

The Assignees tab where you configure rule sets and rules

Callout Number

What It Is

1

The rule set drop-down list, where you can select a rule set to work on or create a new rule set.

2

The link to open properties for the rule set.

3

The Rules pane, which lists the rules within the rules set and has a toolbar for working on those rules, for example to add or delete them.

4

The names of the rule that’s selected in the Rules pane, followed by a link to open properties for that rule.

5 The If section of the rule, where the conditions are defined and there’s a toolbar for working on those conditions.
6 The Then section of the rule, which defines what happens when the conditions are met. There’s also a toolbar specific to this section.

Configure the If Section in Rules

In the If section of the rule, define conditions for the rule. Each line in this section is called a test.

  1. For existing conditions, click on the line that you want to edit, making it active and selected. To add a new line, click the Advanced Add or Modify Options icon and select a type to add, for example simple test.
  2. Click the Left Value icon to select an attribute in the Condition Browser dialog box.

  3. Select an operator.

  4. Click the Right Value icon to select something from the Condition Browser dialog box, or enter a value in the corresponding field.

  5. If you’re not working on the last line, you can click the and or or link at the end of the line to toggle between the two.

    Caution: If the attribute you're evaluating in the condition is optional, users might not have entered a value for that attribute in the UI. For your rule to work properly, it's highly recommended that you first have a line in the condition that checks if the attribute isn't blank. So that means you select the attribute, select isn't as the operator, amd enter null. Then add another line with the condition that you're evaluating the attribute for, and make sure you have an and between the two lines.

To delete a line, put your cursor in any field in the line, and click the Delete icon.

Configure the Then Section in Rules

In the Then section of the rule, define what happens when the conditions in the If section are met.

  1. Edit any existing actions. Or, click the Insert Action icon, and you usually select Add Approver and then a list builder, which controls how to route the task.

  2. Fill in the rest of the section. The fields you get depends on the list builder, but here are some that you might use.

    Field

    What This Is

    Response Type

    Required: The assignee needs to take action, for example to approve or reject.

    FYI: The assignee doesn't need to take action.

    Number of Levels

    Number of levels required for the task to be completely approved, from the starting participant to the top participant.

    Starting Participant

    The first assignee in the approval chain.

    Top Participant

    The last assignee in the approval chain if the chain goes up that high. Approvals don't go beyond this participant, for example in the supervisory hierarchy.

    Auto Action Enabled

    If set to True, there's an automatic action that is taken on the task when the rule conditions are met.

    Auto Action

    "APPROVE": The task is automatically approved.

    "REJECT": The task is automatically rejected.

    Rule Name

    The name of the rule with the Then section that you want to use.

    • Leave the field with the name of the rule you're working on, to indicate that this rule will use the Then section defined here for this rule.

    • Or, you can enter the name of an existing rule from any task, enclosed with quotation marks, and leave all the other fields in this Then section blank. The Then section in the rule you entered would apply to this rule you're working on. So basically, you're reusing the Then section from another rule.

    To select the starting or top participant:

    1. Click the Starting Participant or Top Participant icon.

    2. In the Add Hierarchy Participant dialog box, select the Get User option for a particular user, or Get Manager for an attribute, such as the task creator.

    3. For the Get Manager option only, select the list builder that's used for the rule.

    4. For the Get User option, enter in the Reference User field the user ID that the user signs in with, enclosed in quotation marks, for example "KLEE".

      For the Get Manager option, here's what you do for the Reference User field:

      1. Click the Expression Builder icon.

      1. In the Variables tab of the Expression Builder, select the attribute you want in the hierarchy. For example, expand Task > payload and find your attribute there.

      2. Click the Insert Into Expression button.

      3. Click OK.

    5. Leave the Effective Date field blank to use the latest hierarchy, for example supervisory hierarchy.

    6. Click OK.

    What shows up in the Starting Participant or Top Participant field reflects what you have in the Add Hierarchy Participant dialog box. Here are a couple of examples.

    • HierarchyBuilder.getManager("supervisory",Task.payload.Owner User Name,-1,"","")

      Part of the Participant Value

      What This Means

      getManager

      You selected the Get Manager option.

      "supervisory"

      You selected the Supervisory list builder.

      Task.payload.Owner User Name

      For the Reference User field, you went to Task > payload > Owner User Name in the Variables tab to select the Owner User Name attribute.

      -1

      This is the default value, which corresponds to the primary employment assignment. That supervisory hierarchy will be used to find assignees for the task.

      "",""

      You left the Hierarchy Type and Effective Date fields blank, so there's nothing between the quotation marks.

    • HierarchyBuilder.getPrincipal("KLEE","","")

      Part of the Participant Value

      What This Means

      getPrincipal

      You selected the Get User option.

      "KLEE"

      For the Reference User field, you entered "KLEE".

      "",""

      You left the Hierarchy Type and Effective Date fields blank, so there's nothing between the quotation marks.

Example of a Rule

Let's take a look at an example of a rule. In the If section, we have two tests, the first checking if an attribute is a specific value, the second checking if an attribute is more than a certain amount. The attribute names reflect where the attribute is in the hierarchy you get in the Condition Browser dialog box. The and connecting the two tests means that both conditions must be met.

Example of the If section in a rule

In the Then section, there's the action that applies if the conditions are met, and it's defined based on a Supervisory list builder. Assignees must take action, and only one approval is needed.

Example of the Then section in a rule

Test and Apply Your Rule Set

  1. Click the Validate button in the Assignees tab to see if there’s anything wrong with the rules that needs to be fixed. Results appear in the Business Rule Validation – Log subtab after the Rules subtab.
  2. In the Tasks to be configured toolbar, click the Commit task icon when you're ready to roll out your changes.