Conversion Processing

When a database row is converted to a rule object, then the values of the database columns are used to map to identically-named rule attributes on the rule object. Any database column without a corresponding rule attribute is ignored. The key column for the database table must have a corresponding rule attribute, as this rule attribute will be used to identify the rule object.

Rows from a database table may only be converted if the database table has been modeled to have a primary key which contains a single column, with a data type supported by the converter (see Supported Domain Types). If a database table has no primary key, or has a primary key made up of more than one column, then any attempt to use that database table in this converter's configuration will result in a warning being logged and the configuration for the database table will be ignored.

Restrictions on Access

In your CER rule sets you will use CER's <readall>/<match> expression to access rule objects converted from entity data.

You may only specify a retrievedattribute which matches a database column on the underlying database row used to populate the CER rule object. The data type of the attribute must be Number or String.

If you attempt to specify a retrievedattribute to be the name of an attribute which is calculated by CER, or which is of a data type other than Number or String, then the Entity Rule Object Converter will throw a runtime exception when the CER <readall>/<match> expression is executed.

Do not attempt to search for a retrievedattribute passing a value which would be stored as a NULL by the application's Data Access Layer. No rule objects will be found for such values, e.g. for a unique identifier value of 0 or an empty string.

You may specify the ruleset and ruleclass for the <readall> expression to be a rule class mapped by the data configuration. If you attempt to specify a rule class which is not directly mapped (e.g. a base rule class that you have created from which your concrete rule classes inherit) then no rule objects will be found.

Important: You can use <readall> without a <match> to retrieve all rule objects converted from the entity, but you should do so with care, because:
  • there may be a large number of instances of rule objects for that entity; and/or
  • the dependent will be recalculated every time a new row is stored for that entity or an existing row removed.

A <readall> without a <match> is likely to useful only to convert rule objects from a "control" entity which holds only a small number of rows and it is expected that additions to or removals from those control rows should cause dependents to be recalculated.