Make Sure Options Are Compatible

Use the Compatible keyword in a statement rule to make sure an option that your user selects is compatible with another option.

Here's an example.

COMPATIBLE 
&color OF Frame.Color,
&tint OF Glass.Tint
WHERE &color.userAttrs["Paints_AG.Stain"] = &tint.userAttrs["Paints_AG.Stain"]; 

This rule iterates over all the items of the:

  • Tint option class in the Glass child model
  • Color option class in the Frame child model of the Window model.

If the Stain attribute in an item that's in the Color option class equals the Stain attribute in an item that's in the Tint option class, then the color and tint are compatible with each other, and Oracle Configurator uses the color that the user selects to set the stain to TRUE.

Consider this pseudocode:

If &color.userAttrs["Paints_AG.Stain"] and &tint.userAttrs["Paints_AG.Stain"] equal Clear, and if the user selects the White color, then Configurator will select the Clear stain.

Guidelines

  • You can compare children that are in the same option class or that are in different option classes.
  • You can compare options only in the Constraint class. You can't compare options in the Default class or the Search Decision class.
  • You can't compare options to constrain a selection from only a subset of the participating features.
  • You must include at least two iterators in the code that you write for your compatibility statement.
  • Only one of the rule's participants can have a value in the Maximum Selections attribute that's greater than 1 when you compare options.
  • If you create a statement rule that compares options, and then change the value of the Maximum Selections attribute in any of the rule's participants, then Configurator will display an error when you compile the model.

Syntax

  • Use COMPATIBLE at the beginning of a compatibility statement.
  • You must include COMPATIBLE and two or more identifiers in each compatibility statement.
  • You use the same format for COMPATIBLE. . .OF that you use for FOR ALL. . .IN.
  • You must include a matching identifier in the OF clause for each identifier that you include in the COMPATIBLE clause.
  • Use the WHERE clause to specify the set of combinations that you need for the conditional expression.