Product Administration Guide > Configuration Constraint Template Reference >

Relationship Item Constraint Template


The Relationship Item Constraint template has the form:

For each item [in a relationship], constrain [an expression] to be true

The "in a relationship" operand can be a whole relationship, a subclass of items in a relationship, or a product in a relationship. The "an expression" operand can be any constraint template or any constraint you construct from templates.

The purpose of the Relationship Item Constraint template is to allow you to write a constraint for items in a relationship as if you had written the constraint separately for each instance of the items. For example, you define Relationship A that contains the product with components desktop PC. The desktop PC is a product with components that includes two relationships: CPU and Hard Drive. You then write the following constraint:

For each item in Relationship A, constrain CPU requires Hard Drive to be true

This constraint enforces "CPU requires Hard Drive" separately on each instance of desktop PC in Relationship A. All the desktop PCs from Relationship A must have a hard drive if they have a CPU.

A require constraint does not do this. Suppose you had written the following constraint:

CPU requires Hard Drive

This constraint means if any desktop PC has a CPU from the CPU relationship then at least one desktop PC must have a hard drive from the Hard Drive relationship.

This means, for example, that if the user configures three desktop PCs, all with CPUs, then only one of them must have a hard drive. If the user removes the hard drive, the Siebel Configurator engine would add a hard drive to another desktop PC in the solution or add a new desktop PC that contains only a hard drive. The require constraint defines a constraint that is true about the group of desktop PCs in the solution rather than about individual desktop PCs.

Another problem with the require constraint is that it does not limit enforcement of the constraint to the items in Relationship A. If, in the require constraint example, desktop PCs were also contained in Relationship B, then desktop PCs configured from Relationship B would also be considered when enforcing the require constraint for desktop PCs configured from Relationship A.

An important use of this template is to write constraints that apply to products with components only when these products are contained in a relationship within another product with components.

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