Special Operators in Rule Assembly Language

Special operators, shown in the following table, provide functions that manipulate the Siebel Product Configurator engine directly, rather than the underlying customizable product. They also provide defined types of access to the components of a customizable product.

The inc() operator is used to implement provide and consume constraints. It has two important characteristics:

  • It returns a null value.

  • When it is evaluated in a subexpression, this causes the Siebel Product Configurator engine to contribute the value requested.

This means that writing constraints with the inc() operator as a subexpression based on a condition do not work. The contribution will always occur. For example, you write the following constraint.

req(X, inc(Y, Z))

The Siebel Product Configurator engine will contribute the value of Y to Z, regardless of whether X is present in the solution. This is because the Siebel Product Configurator must evaluate the two arguments to req() before determining what action to take. Evaluating the inc() argument causes the engine to contribute the value of Y to Z.

In addition, regardless of the value of X, the inc() argument always evaluates to null, which makes the constraint meaningless.

To write constraints that contribute conditionally, use the numeric conditional operator, ?().

Operator Syntax Properties

Constraint

con(A)

Makes A a constraint. Returns no result. A can be an item or sub-expression. Use to make sub-expressions into constraints. Redundant for top-level expressions. Rarely used.

Increment

inc(A,B)

Each A requires a B. A can be a number, item, or sub-expression but must resolve to a number. B must be an item and cannot be a sub-expression. inc(1, B) increments the quantity of B in the solution by 1. Use inc(A,B), where A and B are items, to implement cumulative require constraints.

Message

msg(A) "string"

Causes message signal when A is true (selected). User-defined message displays in user message area. Returns no result. A can be an item or sub-expression.

Check

chk(A) "string"

Causes a message-signal when A is false (not selected). User-defined message displays in user message area. Returns no result. A can be an item or sub-expression.

Preference

prefer(expression, 
priority)

The expression is enforced as a constraint only if it does not conflict with any other constraint type or with any user selections. The priority determines the order in which multiple preference constraints for an item are evaluated. Preference constraints with priority 0 that apply to a specific item are evaluated first. Those with priority 1 that apply to that item are evaluated next, and so on.

With Members

withMembers(A,B)

Enforce the constraint B only on instances in A.

This operator allows you to move the context for enforcement of a constraint from the root of a customizable product to a location within it. For example, A can be a path to a relationship within the customizable product. This causes the constraint B to be enforced only within that relationship.

A can be a relationship, a class within a relationship, or a single product. B can be any expression or constraint.

In B, the path must be specified relative to the path in A. For example, if A specifies relationship R1, the paths to items in B, must be specified relative to R1, not the product root. When specifying items in B, do not include any part of the path specified in A.

When adding items to B using the pick applet in the Assisted Advanced Constraint template, you must manually edit the item paths in B to make them relative to the path specified in A.

With Tuples

withTuples (((A, B, C), 
(D,E F), ...), ruleA(%1, 
%2, %3,...),...)

This operator allows you to specify multiple sets of operands for one or more constraints. The first operand in a group is assigned to the variable %1, the second to %2, and so on. You can specify more than one constraint.