Specialized Administration > Tailoring Business Objects > Object Initialization Rules Administration > Working with Object Initialization Rules > Rule Algorithms > General Default Value and Constraint Algorithm Examples > Example of Displaying a Discrete List
  
Example of Displaying a Discrete List
The following algorithms can be used to display a discrete list:
GetDiscreteSetConstraints
DiscreteLifecycleTemplateSetAlgorithm
DiscreteTeamTemplateSetAlgorithm
Which algorithm to use is determined by the type of the values you want displayed in the list. For example, the following XML nested in the AttributeValues tag for the wt.part.WTPart object type displays a discrete list of life cycle templates from which a user can then make a selection:
<AttrConstraint id="lifeCycle.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<Value algorithm="com.ptc.core.foundation.lifecycle.server.impl.DiscreteLifecycleTemplateSetAlgorithm">
<Arg>Default</Arg>
<Arg>Basic</Arg>
<Arg>Change Activity Life Cycle</Arg>
</Value>
</AttrConstraint>
Including the any of these algorithms only determines how the attribute is displayed in the user interface; you must ensure that the values used as arguments are valid. For example in the previous example, the life cycle names used in the Arg tags must be existing life cycle templates.