We recently became aware of a gap in our Knowledge Center content about uploading rulessets. The Knowledge Center will be updated with this as soon as possible, but we were keen to get the update to you.
This database table stores a row for each published CER rule set in the system.
Ordinarily read and write access to this database table is restricted to CER's public API only; however, you are permitted to use the application's data manager to populate this database table provided that both of the following criteria are met:
- The value of the name column must match the rule set name as defined within the XML for the ruleSetDefinition column.
- The value of the ruleSetVersion column must be null.
This is a sample entry from a compliant CREOLERuleSet.dmx file.
See the Working with CĂșram Express Rules guide for steps to extract CREOLERuleSet data from your application (and accompanying AppResource data, if required).
Note that adding a ruleset via a DMX file does not afford the same level of validation for the ruleset as the CER API.
The ruleset XML will be parsed to enforce that it is correctly structured and conforms to the schema.
However the CER semantics are not validated at this stage. For example, references to other classes or attributesare not validated, calls to static Java methods are not validated.
This can result in invalid ruleset XML being stored on the database. If a ruleset is written to the database, use target 'validateallrulesets' to force the new ruleset to be validated.
In addition, the CER API stores a historical version (a ruleset snapshot) of each ruleset whenever a new version is added
whereas using the DMX mechanism bypasses this snapshot. The first time the CER API is used to update such a ruleset, it will automatically create a snapshot for it and will perform full validation against both the old and new version
of the ruleset. Therefore if the original version of the ruleset was invalid, it will result in validation failures at this time, rather than at the time the error was introduced.
This situation can be avoided by ensuring that the CER API has been used successfully at least once on each ruleset (that is, by using the 'creole.upload.rulesets' target) before making any other changes to the ruleset.