Rule Versions

A rule version is one wording of a rule. Whenever a rule's logic needs to change, you save the change as a new version instead of editing the old one. Saved versions never change, so the repository always holds a complete, readable history of the rule: what it said, when, who wrote it, and which version your application was using at any moment. One version at a time can be live; that is the version your application runs.

Each version is written against a specific version of its source object, and remembers it. This is how the repository knows that the fields a version uses really exist.

The components this page uses:

  • The Rule Versions grid: every version of every rule, one row per version.
  • The Rule Version dialog: one version's record. Over its tabs are two lines: the live line, which says whether the version is live, and the approval line, which says where its approval stands. Its tabs show the version's rule, its definition and its details.
  • The New Rule Version dialog: creates a new version of an existing rule in three steps, either from scratch or as a copy of an existing version.

The Rule Versions Grid

Click the Rule Versions tab. Each row is one version, with these columns:

Column What it shows
ID The version's number in the repository.
Name The version's name, such as "v2".
Rule The rule it belongs to.
Source The rule's source object.
Live Yes for the live version of its rule.
Approval Not Requested, Requested, Approved or Declined. See Approvals.
Created By and Created On Who saved the version, and when.
Drafts and Tests How many drafts were started from it, and how many saved tests use it.
The three unnamed count columns Tests not run yet, successful live evaluations, and live evaluations with an error. Hover over a heading to see which is which.

At the start of each row are a check box, used to compare two versions, and two icons: View all live evaluations of this rule version and View this rule version's history.

The filters narrow the list by rule, source, Live or not..., Approval..., creator and creation date. To see the versions of just one rule, click the number in the Versions column of the Rules grid, or use Show related... > Versions in the Rule dialog.

Opening a Rule Version

  1. Click the Rule Versions tab.
  2. Click the version's row. The Rule Version dialog opens, titled with the version's name.

The grey line at the top says which rule the version belongs to and which source version it was written against. Under it:

  • The live line reads This rule version is Live or This rule version is not Live, with Take Offline or Go Live beside it. Hover over it to see when it was made live or taken offline, and by whom. See Going Live.
  • The approval line reads Approval is not requested, Approval is Requested, Approved or Approval was Declined, with the approval buttons you may use. See Approvals.

The dialog's tabs:

  • Rule Editor: the version's rule. It reads Rule Definition: Immutable: you can read it, click through it and copy it, but not change it.
  • AI Rule Editor: ask an AI about this version: what it does, what it uses, how it was tested. It never changes the version. It appears only if your application offers an AI model and you have permission to use it.
  • Source Fields: everything the source version offers, as on the source version's own dialog.
  • Rule XML: the version's definition exactly as the repository stores it, with a copy icon in its corner. This is what your application receives when it loads the rule.
  • Stats: the version's saved tests, the tests not run yet, and how often your application evaluated it in production.
  • Internal Notes: working comments about the version.
  • Details: the version's Name and Description, with Save Changes and Delete Version.

The buttons at the bottom:

  • Show related...: the version's Drafts, Tests, Live Evaluations and User Activity.
  • Compare to...: compare this version with another version of the same rule. See Comparing Rule Versions.
  • Test...: test this version. See Testing Rules.
  • New Draft...: start a draft from this version, to work on a change without saving a version yet. See Drafts.
  • Clone...: start a new version as a copy of this one.

Creating a New Version from Scratch

  1. Open the rule's Rule dialog and click New Rule Version.... The New Rule Version (Step 1 of 3) dialog opens, showing the rule and its source object.
  2. In Source Version, select the version of the source object to write against. The live one is marked (Live).
  3. Click Next →. Step 2 opens with an empty Rule Editor.
  4. Write the rule. See The Rule Editor. Click Test... to try it.
  5. Click Next →. The repository checks the rule; an unfinished or invalid rule is highlighted and you stay on step 2.
  6. In step 3, the rule's name and description are shown on the left. Type a Rule Version Name, and optionally a Rule Version Description and a Rule Version Internal Note. You can also add an Internal Note to the rule itself.
  7. Click Create Version, and answer the save's question as for a new rule: Save Version, Save & Go Live or, if you can only ask for approval, Request Approval or No Approval. See Creating Rules.

Creating a New Version from an Existing One

Most changes are small. Cloning starts the new version with the old version's rule already in the editor, so you change only what needs changing.

  1. Open the version you want to start from, and click Clone.... The New Rule Version (Step 1 of 3) dialog opens. It shows Copied from and the version's name, and its source version is already selected.
  2. To write the new version against the same source version, leave Source Version as it is. To move the rule to another version of its source object, select that version. See When the Source Object Changes.
  3. Click Next →. Step 2 opens with the copied rule. The grey line ends with "started from version" and the version's name.
  4. Make your changes and click Next →.
  5. In step 3, name the new version and click Create Version, then answer the save's question.

The version you copied is not changed in any way.

Changing a Version's Name or Description

A version's rule never changes, but its name and description can:

  1. Open the Rule Version dialog and click the Details tab.
  2. Change the Name or the Description.
  3. Click Save Changes.

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×