Rule Cache overview

When validation errors are repaired and cached, the repair method is saved as a validation rule. These rules are applied to the same field from which they are created when the same schema is in use. You manage the rules in the Rule Cache view in Architecture School. You also use the Rule Cache view to view, modify, or delete non-schema-specific data masks.

Rules are managed under the Rule Cache view in Architecture School.Rule Cache view

Rules can be set up for validation of the messages and values, and also to filter values, or store values into variables.

Existing rules are listed on the left side of the view, and they can be sorted by namespace or path by clicking the appropriate column heading. The star in the left column indicates for each rule whether the rule is enabled Rule cache enabled or disabled Disabled rule cache.

Note: The same icons are used on individual fields to indicate where a rule is applied and whether the rule is enabled.

Under the Config tab on the right side of the view, the selected rule can be enabled or disabled with the Enable rule option. Validation values and actions are listed in the Value and the Validate tab. Actions can be created, modified, cloned, and deleted, the same way as in a message editor (see Messages). When the selected action includes a rule, it is displayed. The rule can be edited and also a description can be added.

At the bottom of the Config tab, you can click Delete to delete the selected rule or click Delete All to remove all rules from the selected schema. Click Delete Orphans to remove all rules from the selected schema that are associated with fields that no longer exist (due to changes to the schema). This button is only available when "orphaned" rules actually exist for the schema.

Testing a rule

The current rule can be tested by using the contents of a file or by entering a test value manually.

Test rule

To test with file contents, click Browse to locate and select the wanted file. Otherwise, simply type the string that you want to use to test the rule in the Document field. To test the document or the manual value, click Test. If the tested value matches the rule, true is returned. If the value does not match the rule, false is returned.

Generic rules

You can create XML-based rules (that is, rules that do not depend on a schema) when you are working in message editors. These rules are displayed in the Rule Cache view with a * for their namespace, since they are applied to matching message fields regardless of schema or target namespace.

Rules in message fields

When you are viewing messages in an action editor, the status of rules on message fields is indicated in the same way as in the Rule Cache view. Existing message actions are overridden with these rules. The values and validations that were previously created in the messages are preserved. By disabling a rule on a particular message field, you can revert its behaviour to the previous one.

In the example that is shown, the highlighted message field is using a validation rule. If you double-click the field to open it in the field editor, you can see the local value that is used in the field. The integer field value contains 5 but its associated rule sets it to 22.

Field editor

The message tree shows the rule cache value and the field editor shows the previously entered value.

If you disable the rule by clicking the Ignore rule cache check box, the icon in the action editor changes, and the original value for the field is displayed again.
Note: If you have more than one rule set on a given field the yellow star is displayed as active unless all of the rules are set to Ignore rule cache.

Non-schema specific data masks

You can use the Rule Cache view to view, modify, or delete non-schema specific data masks. If you want to create non-schema specific data masks, you must use the Recording Studio perspective.

Note: If you want to create, view, or delete schema specific data masks, you can use Recording Studio or the Schema Library view of the Architecture School perspective. If you want to modify schema specific data masks, you must use the Schema Library view.