Product Administration Guide > Configuration Rule Template Reference >
About Rule Conditions
In the Rule Designer, many of the rule templates contain conditions or expressions. For example:
- Exclude template: [Item or condition] excludes [item or condition]
- Require template: [Item or condition] requires [item or condition]
A condition is an explicit statement about the configuration. Conditions can play several roles in a rule template. First, they can act as a test that determines whether a rule is enforced. For example, you write the following rule:
Item A > 4 excludes Item B
This rule states that when the quantity of Item A is greater than 4 in the solution, then Item B cannot be present (is excluded). In this rule, "Item A > 4" is a condition that, when true, causes Item B to be excluded.
When a condition is used as a test, the eConfigurator engine evaluates the condition and returns true or false. If the condition is true, the rule is enforced.
Secondly, conditions can define a constraint. For example, you write the following rule:
Item B excludes Item A > 4
This rule states that when Item B is present in the solution, then the quantity of Item A in the solution cannot be greater than 4. In this rule, "Item A > 4" is a condition that defines a constraint.
Conditions can take several forms:
- Quantity comparisons. The preceding examples are quantity comparisons.
- Item values. The value of attributes, linked items, and resources can be used as conditions.
- Rule Templates. Rule templates can be used as conditions. When rule templates are used as conditions, the eConfigurator engine does not enforce the rule as a constraint but instead evaluates the template as true or false. This is discussed further below.
Boolean operators (AND, OR, NOT) are provided in the Rule Designer to allow combining conditions together or to negate an expression used in a condition.
A third way to use conditions is when writing require or exclude rules about relationships. In the rule "item A requires Relationship B" the eConfigurator engine has no way to determine which items in Relationship B to add to the solution if the user picks item A. So when the user picks item A, the eConfigurator engine prints a message in the user's message area stating that a selection from Class B is required.