Siebel Product Administration Guide > Siebel Configurator Rule Assembly Language > About Operators in Rule Assembly Language >

Comparison and Pattern Matching Operators in Rule Assembly Language


Comparison operators expect numeric operands. This means when you specify an item or arithmetic expression, the Siebel Configurator engine uses the quantity of the item or the value of the expression. These operators produce a logical result. This means the operator evaluates and compares the quantities of the operands and returns a true or false result.

The greater-than operator (>) is an example. The Siebel Configurator engine interprets the following top-level constraint to mean the quantity of item A must be larger than the quantity of item B in the solution. The Siebel Configurator engine enforces this constraint by adjusting the quantity of A or B as needed to make sure that the constraint is always true.

>([A],[B])

When used as sub-expressions, comparison operators return true or false. For example, if the quantity of item A in the solution is not greater than the quantity of item B, the example above returns false. This is then acted on by the associated top-level expression.

Pattern matching operators compare two strings. You can test whether the strings are a match or a mismatch. Pattern matching operators return true or false.

Comparison operators are shown in Table 31.

Table 31. Comparison and Pattern Matching Operators
Operator
Syntax          
Properties

Greater than

>(A, B)

A and B can be items or sub-expressions.

Not less than

>=(A, B)

A and B can be items or sub-expressions.

Equals

==(A, B)

A and B can be items or sub-expressions.

Not equal to

!=(A, B)

A and B can be items or sub-expressions.

Not greater than

<=(A, B)

A and B can be items or sub-expressions.

Less than

<(A, B)

A and B can be items or sub-expressions.

Selected

sel(A)

Returns true if A is positive, false if A is not. Same as >(A, 0). If used as top-level expression, means that A must be in the solution in any quantity. A can be an item or sub-expression.

Pattern match

Like(A, B)

Result is true when string A pattern-matches string B. Similar to Siebel search specification. For example B could be "Pentium*". Note capitalization of operator. A and B must be constants. For example, A and B cannot be attribute names.

Pattern mismatch

NotLike(A, B)

Result is true when string A does not pattern-match string B. Similar to Siebel search specification. For example B could be "Pentium*". Note capitalization of operator. A and B must be constants. For example, A and B cannot be attribute names.

Multiple Operands for Comparison Operators

You can use multiple operands in constraints containing comparison operators. For example, you could write the following constraint:

>([A],[B],[C])

This syntax is interpreted by the Siebel Configurator engine as if you had written two constraints:

>([A],[B])

>([A],[C])

Note that [A] is the first operand in both the constraints. The Siebel Configurator takes the first operand and creates expressions between it and each remaining operands. There are no limitations on the number of operands you can use in this type of expression.

Note that the expression are interpreted by the Siebel Configurator engine as pairs that always include the first operand. This type of expression does not create implied constraints between other operands. For example, you write the following constraint:

!=([A],[B],[C])

This constraint expression is interpreted as A !=B and A!=C. It does not imply that
B !=C.

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