Basic Administration > Supporting Collaboration > Life Cycle Administration > Associate Life Cycles with Objects > Configure Life Cycle Rules
  
Configure Life Cycle Rules
The object initialization rules determine the following:
The life cycle template that is applied when the object is created.
Whether users can select which life cycle to use when creating an object.
Object initialization rules are set by object type or, optionally, subtype. You must have administrative access to edit and create rules.
For more information, see the following topics:
About Object Initialization Rules
Life Cycle Constraints Example
* 
The lowest-level object initialization rule is used. For example, if you navigate to the Object Initialization Rules Administration utility under a product and create a new rule for documents, then that rule is used when a document is created within the product context.
Change the Default Life Cycle Template
1. From the context in which you want to define a new default life cycle, navigate to Utilities > Object Initialization Rules Administration.
2. Select Download from the right-click actions menu.
3. Save a copy of the rule.xml file to your local machine and open it with a text editor.
4. Locate the following lines:
<!-- set the lifecycle -->
<AttrValue id="lifeCycle.id" algorithm="com.ptc.core.foundation.lifecycle.server.impl.LifeCycleTemplateAttributeAlgorithm">
<Arg>
<! -- Translation of the word "Basic" must be the same as the translation done in commonLifeCycles.xml -->
<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match="commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Basic<?loc-end?>
</Arg>
</AttrValue>
5. Change the value of “Basic” to the new life cycle template name. This name must be an exact match to the name defined in the Life Cycle Template Administration utility.
For example, to use the Approval life cycle template, you would make the following change:
<?loc-begin key="BASIC_LIFECYCLE_NAME" maxlen="30" match="commonLifeCycles.xml:BASIC_LIFECYCLE_NAME"?>Approval<?loc-end?>
6. From the Object Initialization Rules table, perform one of the following actions:
Select Edit from the right-click actions menu. For more information, see Editing Rules.
To apply your changes to a lower-level context only, click the new object initialization rule icon on the table toolbar. For more information, see Creating a Rule.
7. Upload the modified rule.xml file.
The following changes occur:
All newly created objects will use the new life cycle template.
All existing objects continue to use the life cycle template that was applied when the object was created. You can use the Reassign Life Cycles action to assign the new life cycle to existing objects.
Allow Manual Life Cycle Template Selection
You can configure the object initialization rules to allow users to choose which life cycle to use when creating an object.
1. From the context in which you want to modify the life cycle options, navigate to Utilities > Object Initialization Rules Administration.
2. Click the download composite rule icon available on the table toolbar.
3. Find and select the object type you are customizing and click OK.
4. Open rule.xml in a text editor and locate the following lines:
<AttrConstraint
id="lifeCycle.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"
ignore="false"
force="false"
final="false">
<Value algorithm="com.ptc.core.rule.server.impl.GetServerAssignedConstraint">

</Value>
<Value algorithm="com.ptc.core.rule.server.impl.GetImmutableConstraint">

</Value>
</AttrConstraint>
5. Modify the attribute constraint as follows. For example, to allow users to select the Basic, Approval, or Manufacturing life cycles:
<AttrConstraint
id="lifeCycle.id"
algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints"
ignore="false"
force="false"
final="false">
<Value algorithm="com.ptc.core.foundation.lifecycle.server.impl.DiscreteLifecycleTemplateSetAlgorithm">
<Arg>Basic</Arg>
<Arg>Approval</Arg>
<Arg>Manufacturing</Arg>
</Value>
<Value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue">

</Value>
</AttrConstraint>
* 
One argument must include the default life cycle name. The default name is identified in the lifeCycle.id attribute value.
6. From the Object Initialization Rules table, perform one of the following actions:
Select Edit from the right-click actions menu. For more information, see Editing Rules.
To apply your changes to a lower-level context only, click the new object initialization rule icon on the table toolbar. For more information, see Creating a Rule.
7. Upload the modified rule.xml file.
Once completed, the following menu is available when creating an object: