Product Administration Guide > Customizable Product Rule Designer >
About the Rule Designer
The Rule Designer is where you create and manage configuration rules for a customizable product. It is also where you create rule templates that can be used for all customizable products.
A configuration rule defines how two items in a customizable product are related. For example, Component A and Component B are mutually exclusive. If the user picks one, then you want to prevent them from picking the other. One way you can do this is by writing a configuration rule: Component A excludes Component B. The Rule Designer provides a rule template to help you write this rule.
Rule templates are rule statements where you replace variables in the statement to create a configuration rule. The Rule Designer provides rule templates for the most common types of configuration rules. You can also create your own rule templates.
In the Rule Designer, you create a configuration rule by first selecting a rule template. Then you pick items from the customizable product and operators or even other rule templates to replace the variables in the rule. Both arithmetic and logical operators are provided by the Rule Designer.
Configuration rules you create apply only to the current customizable product, and are stored as part of it. In contrast, rule templates reside in the Rule Designer and can be used with any customizable product.
To use the Rule Designer, you select a customizable product, then click Configuration Designer and select Rule Designer in the drop-down menu.
The Rule Designer has three parts:
- Rule listing. When you go to the Rule Designer, all the rules defined for a customizable product are listed. You can edit, copy, and delete the rules in the listing.
- Rule template listing. When you click New Rule or New Template in the rule listing, the rule template listing appears. This listing contains the pre-defined rule templates in the Rule Designer. It also lists any templates you have created.
- Rule statement. When you select a rule template and click Continue, the rule template appears in the Rule Statement tab. You then select items from the customizable product, operators, or other rule templates to replace the variables in the rule statement.
The rule listing displays all the rules defined for the customizable product. You can edit, copy, and delete the rules in the listing. The listing has the following fields:
- Name. You specify the rule name when you save the rule. Organize your rule names so you can locate them using the Find button. For example, consider including the rule type (excludes, requires and so on) in the rule name. Searches using only the Name field would then return groups of rules having the same rule type; for example, all the exclude rules.
- Rule. This field contains the rule statement and is not editable. To edit the rule, click Edit.
- Explanation. You specify the rule explanation when you save the rule. Organize your explanations so that you can locate the rule using the Find button. For example, consider including information that uniquely identifies the rule, such as item names. Searches using Name and Explanation would then return the specific rule.
- Start Date. You can specify a start date on which the rule becomes effective. After you release the customizable product, the system does not use the rule to compute solutions until the specified start date. When you specify a start date, you do not have to specify an end-date.
- End Date. You can specify a date on which a rule becomes inactive. After you release the customizable product, the system stops using the rule to compute solutions on the specified date. When you specify an end date, you do not have to specify a start date.
- Inactive. When you put a check mark in this box, the rule is not used to compute solutions. Use this feature in the current work space to simulate the behavior of rules that will have a start date, end date, or both when you release the product. You can also use this feature to deactivate a rule but retain it in a released version of the product.
Rule Template Listing
The rule template listing displays all the rule templates that come with the Rule Designer plus those you have created. It displays in the "Pick a rule" tab when you click New rule or New template in the rule listing.
The rule templates provide the basic rule types you need for creating configuration rules. For example, there are rule templates for exclude rules, others for require rules, and so on.
The templates in the listing are part of the Rule Designer and can be used to create rules in any customizable product. The templates are not specific to the customizable product you are working on.
Each rule template contains variables that you replace to create a configuration rule. You can replace the variables with items from the customizable product, links, resources, expressions, or other templates.
When you select a rule in the rule template listing and click Continue, the Rule Statement tab displays. It contains the rule template you selected. You build a configuration rule by replacing the variables in the statement with items from the customizable product, with resources or links, with operators, or with other rules. To move to another variable in the rule statement, click it. The currently selected variable in the rule statement displays with square brackets around it. Variable that are not current but can be selected, display an underline when the cursor is placed on them. When you select an item for a variable, it displays in red.
The items you can replace a variable with are grouped in the "Insert a" tab, located below the Rule Statement. When you move between variables in the rule, the groupings change to reflect your allowable choices.
In some templates when you replace a variable with a value, typically an expression, the Compound button becomes active. The Compound button lets you nest expressions within expressions. For example, you could use the Compound button to add two variables together where the second variable is itself an expression that adds two variables.
Use the following process to build a configuration rule:
- Select the desired rule template in the rule template listing.
- Select the first variable in the rule.
- Click the desired item grouping.
- Pick the product, operator, or rule template you want to insert.
- Move to the next variable and insert the desired item.
- When you are finished, save the rule.