Create Rules in Advanced Mode

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

For example, the advanced rule can have a condition to search for a specific attribute in an attribute group.

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. A pattern is a way to organize sets of lines, or tests, in the If section.
    • In the field before the operator, enter any term you want that represents the business object. This term is a variable that’s used later in the rule.
    • After the operator, select the attribute for the business object, for example Change Order.
  4. Click the Advanced Add or Modify Options icon in the toolbar after the pattern, and select simple test.
  5. 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.
  6. Add more conditions if required.
  7. 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.

  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.
    • Each: There’s a match every time something in the collection meets the conditions. Notifications are sent for each match.
    • 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.
    • Aggregate: Use this option if you need operations like sum or average on attributes in the collection.
  10. In the toolbar after the collection pattern, click the Advanced Add or Modify Options icon, and select simple test.
  11. Define a condition that the rule would match on within the collection, selecting attributes in the folder named after the variable.
  12. Add more conditions if required.
  13. Configure the Then section.

Here’s an example of the If section for a rule in the advanced mode. The rule will search for attribute groups named CircuitBoard2 in which the dimension is more than 5.

If section for a rule in advanced mode