Product Administration Guide > Configuration Constraint Template Reference >

Require Template


The Require template has the form:

[item or condition] requires [item or condition]

A require constraint is a logical implies. If the first operand is true then the second operand is implied (must be true). For example, Item A requires Item B. This constraint means that if Item A is present in the solution, then Item B must be present. Another example: Condition A requires Item B. This constraint means that if Condition A is true, then Item B must be present in the solution.

A require constraint is not mutual. The constraint Item A requires Item B does not imply Item B requires Item A. However, if Item B is excluded then Item A is also excluded. This is because when Item B is excluded, the constraint can never be true.

The require operator is functionally equivalent to the following Boolean expression:

(NOT A) OR B

In the first two columns of Table 23, a 1 means the item is present in the solution. A 0 means it is absent or excluded.

Table 23. Truth Table for Require Expressions
A
B
NOT A
(NOT A) OR B

1

0

0

False

0

1

1

True

0

0

1

True

1

1

0

True

The table shows that a require constraint behaves as follows:

  • False when Item A is present and Item B is not. (If Item B cannot be present, Item A cannot be present).
  • True when Item B is present and Item A is not.
  • True when neither is present.
  • True when both are present.

Use require constraints to:

  • To create a requires relationship for items in different relationships. For example, you can write a constraint that if Item A in relationship 1 is picked, then Item B in relationship 2 is required.
  • To add items to the configuration if a condition is true.
  • To create relationships between other items (conditions) when a product is added to the solution.

Items

An item can be any of the following:

  • A relationship or class within a relationship. For example, Relationship A requires Item B. This constraint means that when any product in relationship A is present in the solution, then Item B must be present.
  • A product within a relationship

When items are the operands, require constraints are concerned only with presence or absence, not quantity. For example, Item A requires Item B. When the first Item A is added to the solution, the Siebel Configurator engine will add at least one Item B if none are present. When the second Item A is added, the engine does not add any more Item B, since at least one is already present.

Here is how the require constraint works with items:

  • Product A requires Product B

    If Product A is present in the solution, then Product B is required. If Product B is excluded, then Product A is excluded.

  • Relationship A requires Product B

    If any product in Relationship A is present in the solution, then Product B is required. If Product B is excluded, then all the products in Relationship A are excluded.

  • Relationship A requires Relationship B

    If any Product in Relationship A is present in the solution, then at least one product in Relationship B must be present. If all the products in Relationship B are excluded, then all the products in Relationship A are excluded.

Conditions

Conditions can take many forms. Here is a summary of how the require constraint works with conditions in general. How require constraints work with specific types of conditions is covered in the topics following this one.

  • Product A requires Condition B

    If Product A is present in the solution, then Condition B is required to be true. If Condition B is false, then Product A is excluded.

  • Relationship A requires Condition B

    If any product in Relationship A is present in the solution, Condition B is required to be true. If Condition B is false, then all the products in Relationship A are excluded.

  • Condition A requires Product B

    If Condition A is true in the solution, then Product B is required. If Product B is excluded, then Condition A is required to be false.

  • Condition A requires Relationship B

    If Condition A is true in the solution, then at least one product in relationship B must be present in the solution. If all the products in Relationship B are excluded, then Condition A is required to be false.

  • Condition A requires Condition B

    If Condition A is true in the solution, then Condition B must also be true. If Condition B is false, then Condition A is required to be false.

Attribute Conditions

An attribute condition specifies an attribute value and uses it to identify the items in a relationship to which the constraint applies. In the constraint examples below, the attributes are defined on items in relationships within the product with components. You can also define require constraints on the attributes of the product with components itself.

In the constraints examples below, the equals operator is used in the attribute expressions. You can use all the math operators ( <, >, and so on) when writing this type of constraint.

  • Product A requires Attribute C = M in Relationship B

    If Product A is present in the solution, then M is the only value selectable for Attribute C for all items in Relationship B.

  • Relationship A requires Attribute C = M in Relationship B

    If any product in Relationship A is present in the solution, then M is the only value selectable for Attribute C for all items in Relationship B.

  • Attribute C = M in Relationship A requires Product B

    If any product with Attribute C = M in Relationship A is present in the solution, then Product B must be present.

  • Attribute C = M in Relationship A requires Relationship B

    If any product with Attribute C = M in Relationship A is present in the solution, then at least one of the products in Relationship B must be present.

  • Attribute C = M in Relationship A requires Attribute D = P in Relationship B

    If any of the products with Attribute C = M in Relationship A are present in the solution, then P is the only value selectable for Attribute D in Relationship B.

Quantity Conditions

Quantity conditions compare the quantities of two items. Depending on the session context in which the quantity condition is evaluated, it either returns true/false or is enforced as a constraint.

For example you write the following constraint:

(Product A > Product B) requires Product C

If the user picks Product A so that its quantity is greater than Product B, then Product C is required. In this case, the quantity condition is evaluated as true/false, and Product C is required when it is true.

Contrast this with the following constraint:

Product C requires (Product A > Product B)

When the user picks Product C, the condition (Product A > Product B) is enforced as a constraint. In all further solutions, the quantity of Product A must be greater than the Product B. Also, if the quantity of Product B is greater than Product A in the solution, Product C is excluded.

Other Item Constraints

Several other types of conditions can also be used in require constraints. In some cases these conditions do not make sense when used as the second operand in a require constraint. This is because some conditions are always true (message conditions), or the condition cannot be enforced to be true (linked item conditions).

Table 24 summarizes how to use item constraints

.
Table 24. Item Constraint Usage in Require Constraints
Item Constraint
First Operand
Second Operand

Attribute Value

Yes

Yes

Consumes

No

Yes

Provides

No

Yes

Excludes

Yes

Yes

Excludes List

Yes

Yes

Require

Yes

Yes

Require List

Yes

Yes

Linked Item Value condition

Yes

No

Message, Recommends

No

Yes

Product Quantity

Yes

Yes

Relationship Quantity

Yes

Yes

Class Quantity

Yes

Yes

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)

Table 25 shows the truth table for this constraint.

Table 25. (NOT A) OR ((NOT B) OR C)
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

The table lets you analyze what happens when the user picks items. Use the following steps to do this:

  1. The engine must return solutions in which all constraints are true. Eliminate any rows where the top-level expression is False. In the table above, eliminate row 7.
  2. 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 the table above.
  3. 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 the table above. (Row 7 is not considered since the top-level expression is false.)
  4. If only one row has the correct truth conditions, this means the Siebel 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.
  5. 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.

The 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.

Multiple Operands

You can add multiple operands to a require constraint by clicking the Compound Field button when you create the constraint.

For example, you could create the constraint:

Item A requires Item B > 2, Item C < 5

This constraint means the following:

  • If Item A is present in the solution, the quantity of Item B must be greater than 2
  • If item A is present in the solution, the quantity of Item C must be less than 5
  • If Item B cannot be greater than 2 in the solution, Item A is excluded
  • If item C cannot be less than 5 in the solution, Item A is excluded

This is the same as writing two constraints:

Item A requires Item B > 2

Item A requires Item C < 5

Product Administration Guide Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.