Product Administration Guide > Configuration Rule Template Reference >

Conditional Value


The Conditional Value Template has the following form:

( [value] when [condition] is true, otherwise [value] )

This template allows you constrain a value based on a condition. The [value] can be any number or item in the customizable product.

This template does not display in the Pick a Rule list. Instead, it displays in the lists for inserting arguments in a rule. You can insert the Conditional Value template anywhere you can insert a number. The most common use for this template is with provide and consume rules.

For example, you want product P1 to provide 2 to the resource R when the quantity of product P2 is greater than 10. If the quantity of P2 is not greater than 10, you want product P1 to provide 1 to resource R. You would write this constraint as follows:

P1 provides (2 when P2 >10, otherwise 1) to R

If you wanted product P1 to provide 2 to resource R only when product P2 is greater than 10, you would write this constraint as follows:

P1 provides (2 when P2 >10, otherwise 0) to R


 Product Administration Guide, Version 7.5 
 Published: 18 April 2003