Exporting & Importing Rules
Business rules travel with the model export, so a rule built and tested on one installation can be moved to another.
Exporting rules
- Go to Settings → Manage Models → Export.
- Select the models and entities to export.
- Switch on Include business rules.
- Click Export. The JSON file carries the rule definitions alongside the entity structure.
Rules are exported at the entity level. If the export references a domain entity from another model, that entity's rules are not included — only the rules on the entities you selected.
The export also records the name of every column each rule points at, alongside the internal id. The target installation uses those names to translate the rule onto its own columns.
Importing rules
- Go to Settings → Manage Models → Import.
- Upload the export file.
- Choose the conflict action for each entity — Create, Overwrite or Skip.
- Switch on Import business rules. This option appears only when the file actually contains rules.
- Run the import. The result screen shows a Business Rules tile with the number imported.
How rules are matched
Rules are matched to existing rules by name, case-insensitive, within the entity:
| Situation | What happens |
|---|---|
| The entity has no rule of that name | The rule is created. |
| The entity already has a rule of that name | That rule is updated — definition, severity, message, active state and position. |
| The entity has a rule the file does not | It is left alone. |
| The entity's conflict action is Skip | The entity is skipped, and so are its rules. |
Columns that cannot be matched
A rule whose columns cannot all be found by name on the target entity is imported switched off, and the result screen lists it under Business rules imported inactive, naming the columns it could not find.
This is deliberate. An active rule pointing at the wrong column is worse than an inactive one: it would check something nobody asked for, quietly. Fix the column names or rebuild the rule, then click Enable.
Rules and deleted entities
Deleting an entity deletes its rules with it, through a cascade on the entity key. No manual clean-up is needed. Deleting a single rule also removes the stored failure records for it, which is why the confirmation says so.
Related
- Model Export / Import — the full export and import flow
- Creating a Rule from Templates — enable an imported rule from the Rules tab
- Entity Management — deleting an entity and what goes with it
- Business Rules Overview — the model-wide rule table
- Validating Entities — check the data after rules arrive