Creating Configuration Constraint Templates
When you create and save a constraint, the constraint becomes part of the customizable product or product class. The constraint is not visible in other customizable products or product classes.
When you create and save a constraint as a template, it is added to the list of templates. The list of templates is visible in all customizable products or product classes. Create templates for those constraints that you will use with several customizable products. There is a single template list for customizable products and product classes, so any templates you create are available for both.
Templates that refer to items in one customizable product or product class cannot be used to refer to items in another customizable product or product class. Items include products, relationships, links, links and resources. For example, you write the following constraint for customizable product CP1 and save the constraint as a template called A Requires B:
Product A requires Product B
You also have customizable product CP2, that includes Product A and Product B. You want to write the same constraint for CP2.
If you use the template A Requires B in CP2, you will receive a validation error when you validate CP2. This is because each item in a customizable product receives a unique item ID. This item ID is what the application stores as the item name when you create a constraint or a constraint template in a customizable product. This ID is not transferable to other products with components.
To create a constraint template
Navigate to the Administration - Product screen.
Select and lock the desired customizable product or product class.
Navigate to the Constraints view.
From the Constraints List menu, choose New Template.
The Pick a constraint list appears.
Create the desired constraint that you want to use as a template.
Click Save Template and complete the necessary fields in the Custom Template Definition form, as described in the following table.
Field | Comments |
---|---|
Name |
Enter the template name. This name displays in the Pick a constraint list. |
Template Identifier |
Displays a text string that uniquely identifies the template. It does not display to users. |
Description |
Enter a description of what the template does. The description displays in the Pick a Constraint list. |
Translation |
Displays the internal translation of the template. This field is automatically populated by the application and can be used to construct the Spec. |
Spec |
Enter the constraint syntax. The constraint syntax can be derived from the Translation field. |