Siebel Product Administration Guide > Siebel Configurator Rule Assembly Language >
Examples of Constraints Using Rule Assembly Language
This topic contains examples of how to use the Siebel Configurator Rule Assembly Language to create constraints. Some of the constraints show item names consisting of both the product name and its configuration ID (Cfg ID). Basic Constraints
The following table shows how create basic constraints using Rule Assembly Language.
|
|
A requires B noncumulatively |
req(A, B)
|
A requires B cumulatively |
inc(A,B)
|
A excludes B |
excl(A,B)
|
A provides the amount B to C |
inc(*(A,B),C)
|
A consumes the amount B from C |
inc(*(A,-(B)),C)
|
A's minimum quantity is B, enforced |
>=(A,B)
|
A's maximum quantity is B, enforced |
<=(A,B)
|
A recommends B |
rec(req(A,B))
|
Boolean and Comparison Operators
The following table shows how to create constraints using Boolean and comparison operators.
|
|
A AND B =C |
==(and(A,B),C)
|
A OR B = C |
==(or(A,B),C)
|
NOT (A = B) |
xor(A,B)
|
(A < B) requires C |
req(<(A,B),C)
|
(A <= B) requires C |
req(<=(A,B),C)
|
(A = B) requires C |
req(==(A,B),C)
|
(A != B) requires C |
req(!=(A,B),C)
|
(A >=B) requires C |
req(>=(A,B),C)
|
(A >B) requires C |
req(>(A,B),C)
|
(A + B) contributes to C |
inc(+(A,B),C)
|
(A - B) contributes to C |
inc(-(A,B),C)
|
(A * B) contributes to C |
inc(*(A,B),C)
|
(A/B) contributes to C |
inc(/(A,B),C)
|
(A MIN B) contributes to C |
inc(min(A,B),C)
|
(A MAX B) contributes to C |
inc(max(A,B),C)
|
Constraint Template Translations
Table 42 shows examples of the constraint templates translated into Rule Assembly Language.
Table 42. Constraint Template Translations to Rule Assembly Language
|
|
|
Constrain |
con(>(Item A),1)) |
Constrain (quantity of Item A> 1) to be true. |
Constrain Conditionally |
if(>(Item A), 1), >= (Item B), 2), excl(Item C, Item D)) |
When (quantity of Item A> 1)(quantity of Item B >= 2), otherwise Selection of Item C excludes selection of Item D. |
Constrain Product Quantity |
==(Item A, 2) |
The quantity of Item A = 2. |
Consume |
inc(*(Item A), -(1)), Resource B) |
Each Item A consumes 1 from Resource B. |
Exclude |
excl(Item A, Item B) |
Selection of Item A excludes selection of Item B. |
Exclude List |
excl(Item A, Item B, Item C)) |
Item A excludes (selection of Item B, selection of Item C). |
Message |
msg(>(Item A, 1)) |
When (Item A > 1), display this constraint's description. |
Preference |
prefer(Item A, 1) |
When possible, constrain Item A is selected to be true with a priority of 1. |
Provide |
inc(*(Item A), 1), Resource B) |
Each Item A provides 1 to Resource B. |
Recommends |
chk(req(Item A, Item B), "Item B is recommended") |
Selection of Item A recommends selection of at least one Item B by displaying "Item B is recommended". |
Requires |
req(Item A, Item B) |
Item A requires Item B. |
Requires (Mutual) |
eqv(Item A, Item B) |
Item A requires Item B AND Item B requires Item A. |
Constrain Attribute Value |
==(@.[Class A] ([Item B]).[Day], "Monday") |
The attribute Class A "Item B" Attribute C = Monday. |
|