To create or edit a validation rule:
- Log into EnterWorks Classic.
- Open the profile for the repository you want to use the validation rule.
- In the Profile editor, click Next to move to the next page.
- Click the Rule List tab to go to the Rules list.
- To create a new rule, open the Action dropdown menu and select New. To edit an existing rule, open the Action dropdown and select Edit.
-
The Define Rule Details editor will open. Edit the configuration options. The
configuration options in the editor will vary depending on the Type of validation rule you
define.
- Name: (Required. For all rule types.) This is the text that will appear on the record if it fails the validation rule.
- Type: (Required. For all rule types.) The type of validation rule. See Validation Rule Types.
-
Severity: (Required. For all rule types.) Specifies the severity of the
validation error assigned to the attribute if the value of the assigned attribute
violates this rule.
- Warning: The record will be flagged with a warning but will be allowed to promote to production if the validation rule fails.
- Severe: The record will be flagged with an error. This setting will prevent a record from promoting to production if the validation rule fails.
- Level: (Optional. For all rule types.) The validation level this attribute is assigned to. Note that if the Level is not specified, it will default to the highest level.
- Operator: (Required. For the Simple rule type.) The operator used to compare the assigned attribute.
- Value: (Required. For the Simple rule type.) The value the assigned attribute is compared to. You can use the values of the record's other attributes by entering the character [. The names of the record's other attributes will be displayed in a dropdown. If you start to type the desired attribute's name, the list of attributes will be filtered accordingly.
- Formula: (Required. For Calculate and VTL-like rule types.) How the assigned attributes will be altered. You can use the values of the record's other attributes by entering the character [. The names of the record's other attributes will be displayed in a dropdown. If you start to type the desired attribute's name, the list of attributes will be filtered accordingly.
- Call Out: (Required. For Call Out and Pre-save Callout rule types.) The JAVA class process that will alter the assigned attribute. See Callout and Pre-save callout.
- Class Path: (Required. For Callout and Pre-save Callout rule types.) Specifies the class path for the JAVA class process that will alter the assigned attribute. See Callout and Pre-save callout.
- Bulk Rule Text: (Required. For Bulk Callout rule types.) The text of the SQL query performed on the set of records being validated.
-
Conditions: Adding conditions provides you the ability to make the rule
applicable to the attribute based on values of another attribute. To add a condition:
- Click Add.
- Select the attribute from the dropdown menu, choose the appropriate operator and value, then click OK.
- If you have multiple criteria, specify whether all conditions must be true in
order for this rule to be applicable or whether it is necessary for only one
condition to be true.
- Any conditions valid: If one condition is true, the rule applies.
- All conditions valid: All conditions must be true for the rule to apply.
-
Define Rule Attributes: Use the Action dropdown menu to assign or
detach the rule to attributes. Rules assigned to an attribute are available to be
enabled on the attribute.
- Assign: Selecting this opens a list of attributes. Select one or more
attributes you want the rule to be available for. Click OK to save your
selections.
- Language: If a rule has been assigned to a multi-language attribute, the Language button will appear for that attribute. To assign the rule to specific language versions of the attribute, click Language. If no languages are selected, the rule is assigned to the default language of the attribute.
- Detach: To remove the rule from the list of rules that can be enabled for an attribute, select the attribute in the list, open Action menu, then select Detach.
- Assign: Selecting this opens a list of attributes. Select one or more
attributes you want the rule to be available for. Click OK to save your
selections.
- Click OK to close the Rule Definition editor and return to the Profile editor.
- Click Save.
-
Enable the rule for each of the repositories you want it to be in effect for:
- Open the repository's rule properties by opening the Feature bar, clicking the repository, selecting Edit, and selecting Rule Properties.
- The Rules Properties editor will open. It has a list of available rules, which have not been enabled for the repository, and a list of selected rules which have been enabled. Select one or more rules and use the arrow buttons to move the rules between the lists.
- When you are done enabling rules for the repository, click Save.
- Clear the cache.
- If you have any tabs open for repositories that the rule was enabled or disabled for, refresh those tabs.