Nested Expressions as Conditions
The Require template can itself be used as a condition in other constraints.
The most common templates used for writing nested constraints are the Require and Exclude
templates. For example, you could write the following configuration constraint: Product A
requires (Product B requires Product C)
.
The Boolean form of this constraint is as follows: (NOT A) OR ((NOT B) OR
C)
.
The following table shows the truth table for this constraint.
Row | A | B | C | NOT A | (NOT B) OR C | (NOT A) OR ((NOT B OR C) |
---|---|---|---|---|---|---|
1 |
F |
F |
F |
T |
T |
T |
2 |
F |
F |
T |
T |
T |
T |
3 |
F |
T |
F |
T |
F |
T |
4 |
F |
T |
T |
T |
T |
T |
5 |
T |
F |
F |
F |
T |
T |
6 |
T |
F |
T |
F |
T |
T |
7 |
T |
T |
F |
F |
F |
F |
8 |
T |
T |
T |
F |
T |
T |
This table lets you analyze what happens when the user picks items. Use the following steps to do this:
-
The engine must return solutions in which all constraints are true. Eliminate any rows where the top-level expression is False. In this table, eliminate row 7.
-
To determine what happens when the user picks an item, look at all rows that list true for that item. For example, to analyze what happens when the user picks Product A, you would look at rows 5, 6, and 8 in this table.
-
To determine what happens when a combination of items are picked, look at all the rows that list true for both items at once. For example, to analyze what happens when the user picks both Product A and Product B, you would look at only row 8 in this table. (Row 7 is not considered since the top-level expression is false.)
-
If only one row has the correct truth conditions, this means the Siebel Product Configurator engine will return the result shown in that row. For example, look at row 8. This is the only remaining row that lists item A and B as both true. Since this row lists C as true, this means that when both A and B are present, C must be present.
-
If several rows have the condition you are analyzing, look at the truth conditions for each unpicked item in the rows. If they are all true, the unpicked item is required. If they are all false, the unpicked item is excluded. If an unpicked item lists true in some rows and false in others, this means the unpicked item is neither excluded nor required and is available.
This table reveals that the constraint has the following behavior:
-
When none of the products are present, the user can pick any of the three, and the other two will not be required.
-
If the user picks Product A and B, then Product C is required.
Thus, the constraint's behavior can be summarized this way: when the user picks Product A, the condition "Product B requires Product C" is enforced as a constraint.