Specialized Administration > Tailoring Business Objects > Object Initialization Rules Administration > Understanding Object Initialization Rules > Defining the Content of XML Documents used for Object Initialization Rules > Algorithms Used with AttrConstraint
  
Algorithms Used with AttrConstraint
You specify one or more algorithms for each attribute specified in the AttrConstraint tag. Using the com.ptc.core.rule.server.impl.GatherAttributeConstraints algorithm, you set up the structure to gather the constraints. You can specify zero, one, or more of the constraint algorithms to set the display characteristics that you want.
For more information on how the constraint algorithms work together and for the specific syntax to use in the AttrConstraint tag, see AttrConstraint Tag Syntax.
Out of the box, Windchill provides the following constraint algorithms. The names are shortened in the list below; enter the tag, including the full name of the algorithm, on one line.
Algorithm
Description
com.ptc.core.rule.server.impl.
GetHiddenConstraint
The user interface does not display a label or value for the attribute.
com.ptc.core.rule.server.impl.
GetDiscreteSetConstraint
The user interface allows picking from a list of discrete values for the attribute where the argument type matches the attribute type. The values are specified as arguments to the algorithm.
com.ptc.core.foundation.lifecycle.server.impl.
DiscreteLifecycleTemplateSetAlgorithm
The user interface allows picking from a list of discrete life cycle template values for the lifeCycle.id attribute. The values are specified as arguments to the algorithm.
com.ptc.core.foundation.team.server.impl.
DiscreteTeamTemplateSetAlgorithm
The user interface allows picking from a list of discrete team template values for the teamTemplate.id attribute. The values are specified as arguments to the algorithm.
com.ptc.core.rule.server.impl.
GetImmutableConstraint
The user cannot change the attribute value that is being displayed. If an attribute that has another constraint does not have this constraint, then the user is allowed to manually enter a value. For more information, see Examples using GetServerAssignedConstraint and GetImmutableConstraint.
com.ptc.core.rule.server.impl.
GetServerAssignedConstraint
The user interface does not display a value for the attribute; the value is generated when the user clicks OK to save the object instance. The text displayed in place of the value is similar to (Generated). For more information, see Examples using GetServerAssignedConstraint and GetImmutableConstraint.
com.ptc.core.rule.server.impl.
GetServerPreGeneratedValue
The user interface displays a value for the attribute. The value is generated before the user interface is displayed. The value displayed is specified as an argument to this algorithm, or if not specified, is obtained by executing the corresponding AttrValue tag for the given attribute.
* 
For number attributes where the default number value is sequentially generated, using this constraint can cause numbers in the sequence to be unused. The skipping of numbers occurs when a user accesses the interface and then cancels the operation before saving. There is no way to reclaim the skipped numbers.