To incorporate a new rule file, you must define a new rule set that must reference the same DSL file that is referenced within the rule file. This rule set must be saved to a custom XML file under WEB-INF/config/custom/xml. Furthermore, you must overwrite the existing rule context to which the new rule set is to belong, and also save it to a custom XML file under the path mentioned above. In the following example, the rules of the USERGROUP form are extended by two new rules.
Location |
DRL file in the rules folder XML file in the xml folder |
Procedure |
|
Documents |
Corresponding DRL file in the default configuration Corresponding DSL file in the default configuration rulesetReg.xml in the default Java doc of the CollectiveHelper class and its derived classes for an overview of possible conditions and consequences. |
Example |
ModifyRules_AddDRL\WEB-INF\config\custom\rules\usergroup.drl: Add custom rule set ModifyRules_AddDRL\WEB-INF\config\custom\xml\custom_ruleContext.xml: Overwrite the ruleContext and add the custom ruleSet ModifyRules_AddDRL\WEB-INF\config\custom\xml\custom_ruleContext.xml: Add custom ruleSet ModifyRules_AddDRL\WEB-INF\config\custom\xml\custom_usergroupform: Enable rule execution on change of form element 'name' |