The Cúram Rules Codification Guide and the Cúram Rules Editor Guide provide an introduction to the support for rules in Cúram. A rule set is the fundamental structure which describes the rules within a Cúram application. It is the database that is the system of record for rule sets. This allows the rule sets to be changed at run-time via an administration client. However, support is also provided for representing rule sets as .xml files. These .xml files can be used for source control management. To allow for the synchronization between these .xml files and the database a number of extra targets have been introduced:
rulesetid - Identifier of the ruleset that is to be exported from the database.
component - Name of the component to which the rule set has to be exported (copied).
For example:
build exportruleset -Drulesetid=PRODUCT_1 -Dcomponent=custom
Where 'PRODUCT_1' denotes the identifier of the ruleset that is to be exported from the database and 'core' denotes the name of the component to which the rule set has to be exported (copied).
ruleset.file - This parameter denotes the path of the ruleset that is to be placed on the database.
overwrite (Optional) - This is an optional flag with the default value as false, indicating whether the database should be overwritten if the ruleset already exists.
For example:
build importruleset -Druleset.file= <SERVER_DIR>/components/core/rulesets/PRODUCT_1.xml -Doverwrite=true
Where <SERVER_DIR>/components/core/rulesets/PRODUCT_1.xml denotes the path of the ruleset definition file and true denotes the flag to overwrite the database, if ruleset already exists.
The validator ensures that the rule set ID is unique by searching for existing IDs in the SERVER_DIR/components/../rulesets directories.
schema.file (Optional) - This optional parameter specifies the rule set schema that has to be used for validating the rule sets.
For example:
ant validateallrulesets ant validateallrulesets -Dschema.file=C:/Rules/ruleset.xsd
The validator ensures that the rule set ID is unique by searching for existing IDs in the SERVER_DIR/components/../rulesets directories.
schema.file (Optional) - This optional parameter specifies the rule set schema that has to be used for validating the rule sets.
rulesets.dir - This parameter specifies the directory within which rule sets are to be validated.
For example:
ant validaterulesets -Drulesets.dir= <SERVER_DIR>/components/core ant validaterulesets -Drulesets.dir= <SERVER_DIR>/components/core -Dschema.file=C:/Rules/ruleset.xsd
The validator ensures that the rule set ID is unique by searching for existing IDs in the SERVER_DIR/components/../rulesets directories.
schema.file (Optional) - This optional parameter specifies the rule set schema that has to be used for validating the rule set.
ruleset.file - This parameter specifies the rule set path and file name.
For example:
ant validateruleset -Drulesets.file= <SERVER_DIR>/components/core/rulesets/PRODUCT_1.xml ant validateruleset -Drulesets.file= <SERVER_DIR>/components/core/rulesets/PRODUCT_1.xml -Dschema.file=C:/Rules/ruleset.xsd