This section describes the process you must follow to clone rule sets
included with the application so that you can customize the cloned rule
sets to meet your product's needs.
If you need to customize any rules element in a rule set included with
the application, or if you rely on the current functionality of the
version of a rule set included with the application, then you must clone
the rule set and all of its dependencies, in terms of application derived
data/business logic rules classes (but not infrastructure rule
classes).
CAUTION:
The documentation includes a dependency map of all the rule sets
included with the application. Please refer to the CER Rule Set
Interdependencies.svg in the README
directory of your installation. The map shows application (clone-able)
rule sets in white and infrastructure (not clone-able) rule sets in gray.
This map may serve as a useful artifact in identifying exactly which rule
sets you will need to clone and update.
Follow these steps to clone rule sets:
- Identify the rule set(s) that is your entry point into the rules
(typically from a rule class).
- For each of these rule sets, follow the arrows on the dependency
diagram, to find any other Application rule sets on which those to
customize depend. Repeat this step recursively until there are no more
arrows or to Application rule sets.
- For each of the Application rule sets found in the above steps,
follow the arrows backwards to pick up any additional Application rule
sets that depend on the rule sets found so far. Repeat this step
recursively until there are no more arrows to follow backwards.
- Each of the Application rule sets found during the above steps must
now be cloned and any references to other cloned rule sets updated.
Follow the steps below.
Additional steps may be required to update propagator configuration and
rule class links. Once you have completed cloning your rule sets, you must
follow these steps:
- Some of the rule sets you have cloned may have had rule object
instances created automatically by the configurable rule object
propagators. If so, you must identify the propagator configurations and
create a custom configuration to also populate rule object instances for
your cloned rule sets. Follow the steps below:
- Inspect the propagator configurations included with the
application (i.e. those referenced from EJBServer/components/ component name /data/ directory
/RuleObjectProapgatorConfig.dmx ) to see if any
propagator configurations target the rule sets that you have
cloned.
- Search the propagator configuration XML files (in the blob/clob
directories within the component data directories) using the XPath
//ruleset/@name to find the targeted rule
sets.
- If any targeted rule set is one that you have cloned, then you
need to write your own propagator configuration to target the cloned
version of the rule class (i.e. the rule class in your cloned rule
set). Create a propagator configuration in your custom component to
do so.
- Some of the rule sets you have cloned may have been referenced in
rule class links from CER-based Products. If so, you must identify the
rule class links and update them to point to your cloned rule sets.
- Find the original database IDs of the rule sets you have
cloned.
- Inspect all the EJBServer/components/ component name
/data/ directory /CREOLERuleClassLink.dmx files to find
any rows where creoleRuleSetID = the original
database ID of any of the rule sets you have cloned.
- For any entries found, create an entry in your
EJBServer/components/custom/data/initial/CREOLERuleClassLink.dmx
file to override entry included with the application; change the
creoleRuleSetID to be the new ID for your cloned
version of the rule set.