Facts Editor

 

In the RuleLab.Net, Facts are instances of the Atom templates. They are assigned the specific data values and an optional narrative description. You can look at Facts as the knowledge elements derived from your XML model. In the Facts Editor each row corresponds to a single Fact containing an Alias and Data Value fields.

 

Alias field contains 3 elements:

  • Alias text box - type any globally unique name here
  • Atom template – the name of an Atom that instantiates this Fact. To enter one, click the atom link and pick one from the popup.
  • Narrative (optional) – narrative description of the Fact. To enter it, click the narrative link and type the text in.

 

The Data Values field is populated with Atom’s XML Reference names and data value boxes when you select the template Atom. Each data box is formatted according to the XML Reference data type. Please type in data values in the boxes.

 

When you are done entering Facts, click the Validate button. Correct issues if any and click the Save button to write the Facts XML file into the online database.

 

Entering a Narrative Description

 

RuleLab.Net allows you customize how the Fact should be rendered in the Rule Browser screen. This feature helps with Rules readability by making a Rule look closer to a natural language syntax. The Narrative Description popup allows you to copy the Reference aliases into the text body rather than entering data constants so that the Description does not have to be updated if data value changes later on.

 

Changing Atoms and Facts

 

RuleLab.Net supports multiple Fact files that can be instantiated from a single Atoms file. Since only one Fact file is loaded into the Facts Editor, changes made to the Atom’s XML References will not be automatically reflected in the associated Facts files. Your Facts files could be stored offline and may not even be available to the Rules Designer at the time of Project editing. However, if/when an associated Facts file is eventually loaded as part of a Project, the Facts Editor will synchronize it with the Atom definitions.

 

 

If you delete a Reference from an Atom it will not be automatically deleted from the Fact instances in all related Fact XML files because they may not be available at the time you make a change to an Atom file. If this Reference is encountered by the BRE, it will be ignored. When you load a Project containing both the Atom and Fact file in question, the obsolete Reference(s) will be removed.

 

If you add a Reference to an Atom, it will be added by the Atoms Editor to all associated Facts in the Facts file loaded within the Project. If you are already working with Facts file at the time of adding a new Reference to an Atom, you can update the Facts list by clicking the Refresh button on the Facts screen.