Logic Rules

This chapter covers the following topics:

Logical Relationships

Logic Rules enable you to express constraints among elements of your Model in terms of logical relationships. For example, selecting one Option A may require that Options B and C be included in the configuration.

When defining a Logic Rule, you specify the rule’s behavior by selecting a logic relation. Oracle Configurator Developer provides the following logic relations:

The following sections describe each type of relation and present tables illustrating their behavior. In each table, the unshaded portion indicates the logic state the option has after an end user selects it, and the shaded portion indicates the logic state of the option on the other side of the rule that results from the selection. The arrows indicate the direction in which the rule propagates.

Notice that a rule can propagate from Operand 1 to Operand 2 of the relation, or from Operand 2 to Operand 1. Notice also that for some values and some logic relations the rule does not propagate; therefore logic state of the option on the other side of the rule does not change.

Note: In this chapter, "true" and "false" are used generally to indicate only whether an option is included or excluded from the configuration. Therefore, the examples in the following sections do not differentiate between User True and Logic True, and User False and Logic False. For details about how the runtime Oracle Configurator uses logic state to display options, see Selection State.


The effect of the Implies relation:

The Implies Relation

the picture is described in the document text


The effect of the Excludes relation:

The Excludes Relation

the picture is described in the document text


Logic rules that use the Requires relation "push both ways," which means that selecting an option on one side of the rule has the same effect on the option on the other side of the rule. See the examples below for details.

The effect of the Requires relation:

The Requires Relation

the picture is described in the document text


The Negates relation is similar to the Requires relation, in that it also "pushes both ways." However, the Negates relation prevents an option from being selected when an option on the other side of the rule is selected. In other words, selecting one option prevents the other option from being included in the configuration.

The effect of the Negates relation:

The Negates Relation

the picture is described in the document text


The effect of the Defaults relation: If the end user selects the Option A, it becomes true and Option B is also selected and becomes true.

Unlike other logic relations, the logic state of Option B is not enforced. An end user can set Option B to true or false (that is, select or deselect it), regardless of the state of Option A, and Oracle Configurator will not display a contradiction message. The relation’s only action is to set Option B to true when Option A is true.

If Option B is already true, the rule does not change the option’s state when Option A is selected. In other words, a Logic Rule that uses the Defaults relation only selects additional options when the end user, or the action of another rule, selects an option (or options).

A Defaults Logic Rule can be used to set up an initial configuration, for example, by triggering a set of Defaults relations with a Boolean Feature whose initial value is true.

For example, you define a Boolean Feature X with an Initial Value of True. You also define Feature Y which has three Options: A, B, and C. The Maximum Selections for Feature Y is 2. You then define the following Logic Rules:

Feature X Defaults Feature Y

Feature Y Defaults AllTrue (A, B)

At runtime, both Option A and B are selected, and have a logic state of Logic True. Because the Maximum Selections for Feature Y has been reached, Option C has a logic state of Logic False. If the end user deselects Option A, it becomes User False and Option B becomes Unknown (that is, it is no longer selected). To avoid this behavior, delete the second rule (Feature Y Defaults AllTrue (A, B)) and define the following rules:

Feature Y Defaults A

Feature Y Defaults B

Note: When multiple Default rules are evaluated and conflict with one another, it is inconclusive as to which rule succeeds. Using many Defaults Logic Rules can significantly affect runtime performance of a configuration model. For more information, see the Oracle Configurator Modeling Guide.

Summary of Logical Relationships

Compare and contrast the effects of the logical relationships as shown in Summary of Logical Relationships :

Summary of Logical Relationships

the picture is described in the document text

Using AllTrue and AnyTrue

The preceding sections describe logical relationships in terms of true and false values for Operand 1 and Operand 2 (the two sides of the relation). You can also define logic relations where Operand 1 or Operand 2 involves an expression of more than one term; for example, all Options of a Feature. In this case, you must specify whether that side of the relation is true if all of the terms are true, or if that side is true if any of the terms are true.