Administración especializada > Adecuación de los objetos de negocio > Administración de reglas de inicialización de objetos > Understanding Object Initialization Rules > Defining the Content of XML Documents used for Object Initialization Rules > Conditional Logic Algorithms
  
Conditional Logic Algorithms
To qualify when values are set or constraints used for Windchill attributes in object initialization rules, you can integrate the use of conditional logic algorithms into both the AttrValue and AttrConstraint tag syntax.
PTC provides the following types of conditional logic algorithms:
Test algorithms - always return either a TRUE or FALSE value.
Branch algorithms - always branch between the supplied <Arg> elements.
* 
Values for any attributes used within the algorithms for the conditional logic must be set before the object initialization rule is evaluated.
The attribute value used in the conditional logic must be set before the field used for the attribute specified in the AttrConstraint tag is displayed. For example, if fields for the document template and the document number appear on the same step that is used to create a document, then the value of the document template cannot be used to determine the generation scheme for the number.
Also, any attribute used within default value algorithms for conditional logic evaluation purposes must be set before the object initialization code executes.
* 
The use of conditional logic requires that you understand the sequence of how values are set for attributes through the user interface. For example current user interface implementation for selecting folders does not support the use of conditional logic for the folder.id attribute.
For details on the syntax required for the conditional logic algorithms, see Algoritmos de lógica condicional.
The following sections provide some examples of the conditional logic algorithms.
For a list of out-of-the-box test and branch algorithms, see Algoritmos de prueba and Algoritmos de división.