Product Administration Guide > Configuration Constraint Template Reference >

Conditional Value Template


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 Constraint list. Instead, it displays in the lists for inserting arguments in a constraint. 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 constraints.

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 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.