Setting Up Business Rule Criteria

This topic describes how to create logical expressions as the criteria for rules in the Business Rules Framework.

Adding Criteria

Criteria are logical statements that consist of a field to evaluate, an operator, and a comparison value. You can:

  • Join and group the expressions to indicate an order of operations.

  • Include up to three levels of nested rows of criteria.

This example illustrates the Criteria grid and how logical expressions are configured. Details are in the text surrounding the image.

Business Rules Framework criteria grid

Element

Description

Sequence

Select the order in which the statement executes within the business rule. For example, 1 means that the statement in that row runs first, 2 runs second, and so on.

Note: Set the order in which each statement should run. Do not leave any gaps between sequence numbers. For example, the sequence should be 1, 2, 3, 4, not 1, 3, 4.
Note: When you save, the application validates and redraws the grid based on the entered sequence. For example, if you enter a sequence of 2, 3, 1, the application renders it as 1, 2, 3 in the grid after you save, assuming the logic is valid.

Opening Grouping

Use the opening parentheses to establish the beginning of a grouping of one or more statements in the business rule expression. You can nest groupings up to three levels using (, ((, and (((. Make sure to balance (pair) the opening and closing groupings. That is, you need the same amount of left parentheses as you do right parentheses.

Field

Select the predefined source field from the resource.

Operator

Select from the available comparison operators to specify how the entered value must relate to the source field from the resource.

  • Equals

  • Not equal to

  • Greater than

  • Less than

  • Greater than or equal to

  • Less than or equal to

  • Starts with

  • In

  • Not in

  • Contains

  • Before (time)

  • After (time)

The Before (time) and After (time) operators enable you to set a specific time in the day, such as1:30 PM and to check before and after that time. You can also define multiple periods throughout a day. For example: (After (time) 8:00 AM AND Before (time) 10:00 AM) OR (After (time) 1:00 PM and Before (time) 3:00 PM).

Note: Depending on the field’s data type, the list of operators changes to show only those that apply.

Value

Enter the comparison value to the source field from the resource.

Closing Grouping

Use the closing parentheses to establish the end of a grouping of one or more statements in the business rule expression. You can nest groupings up to three levels using ), )), and ))). Make sure to balance (pair) the opening and closing groupings. That is, you need the same amount of left parentheses as you do right parentheses.

Grouping Verb

Select AND or OR to include a logical operator. All rows in the grid require a grouping verb, except for the last row in the sequence.

Actions

Select to add or delete a level (row) in the expression.

Using Tokens

When adding criteria, you can use these tokens in the Value field to help define your expressions.

Token

Description

${Current Date}

Allows for comparison of an attribute date value, such as Scheduled Due Date, to the current system date. This comparison is done on the date portion only, with the time stamp being removed before comparison.

${Current Date Time}

Similar to $(Current Date), except the time stamp is included in the comparison.

${Weekend}

Converts the attribute date to a number (1-7) then checks if the returned value is in ('1','7').

${Weekday}

Converts the attribute date to a number (1-7) then checks if the returned value is in ('2','3','4','5','6').

${<Attribute Name>}

Enables you to compare between two attributes on the same resource. Use the name of the attribute as it appears in the Field drop-down list, and place it within curly brackets {}.

For example:

{Plan Reviewer Due Date} + 2

Note: In scheduled rules, you can't perform math operations on attribute tokens, such as {Plan Reviewer Due Date} + 2.