The converter and propagator share a common set of configuration data,
and accept configurations which adhere to the following structure:
- propagator type must be "ROPT2003" (the code for 'General CRUD
entity' from the RuleObjectPropagatorType code
table);
- each entity to be converted or propagated must be listed in a
table element with a name exactly matching the database
table's name, as per the application model;
- each propagation target must be listed as a ruleset
element (within the table element), specifying the name
of the rule set to target and optionally the rule class (if the name of
the rule class differs from that of the database table);
- each table element may optionally specify a
column/value combination which identifies the row as "canceled"; any row
on the table which has this column/value combination will not be
propagated - this feature allows physically and logically deleted rows
to behave the same (i.e. to cause the Entity Rule Object Converter to
not populate a rule object where the underlying database row is marked
as logically deleted); and
- each ruleset element may optionally specify a
filter element to specify a custom filter class which
determines whether each row should be included or excluded from the
Entity Rule Object Converter and Propagator. The filter
element must specify the name of the filter
implementation, and may include a filterconfig element
to provide filter configuration specific to the filter implementation.
The Engine includes an EntityAttributePropagationFilter
which provides a simple ANT-like filtering mechanism based on
include and exclude elements.
Configurations are cumulative, i.e. there may be many configurations of
type "ROPT2003", and if an entity is present in any of those
configurations then the entity will be converted and propagated;
otherwise, the entity will be ignored.
Note: Any database tables which are on the "exclude" list (see
Propagation Processing)
cannot be propagated (and will be ignored).
Tip: You are free to create your own rule classes to match
database entities whose data you require in CER rules. However, you should
first check whether existing rule classes are already suitable for your
needs - while it is possible to convert each database row to many
different rule classes, this flexibility comes with a potential
maintenance cost for your rule sets.
In particular, the application
includes configurations to convert and propagate data which is
particularly often used in eligibility/entitlement processing to rule
classes included with the Engine in these rule sets:
- ParticipantEntitiesRuleSet; and
- CaseEntitiesRuleSet.
You should consider reusing these rule classes when creating
your own rule sets, in order to avoid maintenance overhead for your rule
sets.
When you create your own rule classes for propagated data, it
is recommended that you:
- implement a meaningful calculation of the
description rule attribute (which can be useful for
debugging); but
- do not implement any other calculated attributes on the rule class
(in order to promote re-use of your rule classes across
products).
If you require to map all rows from a database table to one rule class,
but only the non-canceled rows to a different rule class, then you should
create separate table elements which name the same
database table, but only specify the canceledValue and
statusColumn attributes on one of the
table elements. Similarly, if you require different
filters for different rule classes, create separate table
elements which name the same database table.
The following types of configuration problems will be detected by the
Entity Rule Object Converter/Propagator processing:
- Entity name not specified in the table
element;
- The modeled database table with the specified name could not be
found;
- The modeled database table does not have a single-field primary
key;
- The modeled database table is propagated to a rule class which does
not contain an attribute corresponding to the primary key of the rule
class.
- A rule class is targeted by more than one source entity;
- The filter class specified for a filter is invalid; and
- The name or value is missing when using the
EntityAttributePropagationFilter.
Any configuration problems detected will be processed according to
Data Configuration Problems.