Documentation
Getting Started
Data Grid
Modeling
Approvals
Users, Roles & Security
Administration
Integration & API
Installation
Migrating from MDS
Architecture
Documentation/Business Rules/Exporting & Importing Rules

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

  1. Go to Settings → Manage Models → Export.
  2. Select the models and entities to export.
  3. Switch on Include business rules.
  4. 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

  1. Go to Settings → Manage Models → Import.
  2. Upload the export file.
  3. Choose the conflict action for each entity — Create, Overwrite or Skip.
  4. Switch on Import business rules. This option appears only when the file actually contains rules.
  5. 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:

SituationWhat happens
The entity has no rule of that nameThe rule is created.
The entity already has a rule of that nameThat rule is updated — definition, severity, message, active state and position.
The entity has a rule the file does notIt is left alone.
The entity's conflict action is SkipThe entity is skipped, and so are its rules.
Importing rules never deletes one. A rule that exists here but not in the file survives the import. Delete it yourself if it should go.

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.

Ready to get started?

Start managing your master data with Primentra today.

View Pricing
Exporting & Importing Rules | Business Rules | Docs | Primentra