Create Rules in Advanced Mode

You can configure rules in advanced mode to optimize how rules perform when they're applied. Use this mode when the rule conditions involve business objects that have hierarchical attributes and collections. Collections are a grouping of transactional data.

For example, a change order is a business object that contains child entities such as affected objects, where each affected object can be in a different life cycle phase. The affected objects represent a collection of data that the rule needs to evaluate across various life cycle phases. Therefore, the advanced rule can include a condition that searches for affected objects matching a specific life cycle phase.

Here’s how you generally go about creating a new rule in advanced mode:

  1. Click the Properties link after the rule name. Here's a screen that show the Properties link. Properties link for a rule
  2. In the dialog box that appears, select Advanced Mode and click OK.
  3. Click the Insert Pattern link in the If section to get a pattern with the "is" operator. Insert Pattern
  4. A pattern is a way to organize sets of lines, or tests, in the If section.
    • In the field before the operator, enter the term you want that represents the business object. This term is a variable that’s used later in the rule. For example, ChangeLine.
    • After the operator, select the attribute for the business object. For example, RevisedItemLineApproval.
  5. Click the Advanced Add or Modify Options icon in the toolbar after the pattern, and select simple test.
  6. Define a condition that the rule would match on for the business object. Select an attribute in the folder named after the variable you entered earlier. Select an attribute in the folder named after the variable you entered earlier. For example: ChangeLine.item.lifecyclePhaseValue is "Design".
  7. Add more conditions if required.
  8. In the toolbar for the collection pattern, click the Surround selected tests with parenthesis icon, and select Surround. The surround option puts the pattern you just added and other conditions you define later within parentheses, to group them all together. Conditions within parentheses are evaluated in their entirety, in this case, against the collection.
  9. In the drop-down list before the collection pattern, select how you want the rule to match against the collection.
    • At least one: As soon as the first match is found in the collection, a notification is sent and the rest of the collection isn’t evaluated.
    • None: The entire collection is evaluated, and a notification is sent when nothing matches.
  10. In the toolbar for the business object pattern, click the Add Pattern icon.
    • In the field before the operator, enter Lists.
    • After the operator, select Lists.

    This pattern is needed because the rule involves collections.

  11. Configure the Then section.

Here’s an example of the If section of a rule in the advanced mode. The rule searches for change orders that have reason code as SAFETY, where at least one of the affected objects has life cycle phase value set to Design.

ChangeOrder and ChangeLine are the two variables.

Paths ChangeOrder.reasonCode and ChangeLine.item.lifecyclePhaseValue show that the attributes were selected from folders named after the variables.

If section for a rule in advanced mode