Conversion Processing

Each evidence type may map to a number of target rule classes, according to the configurations for the Active Succession Set Rule Object Converter held on the system. However, for the sake of clarity, the rest of this section describes the behavior of the Active Succession Set Rule Object Converter in the situation where an evidence type is mapped to a single rule class only.

When an Active Succession Set Rule Object is requested during a CER calculation, the Active Succession Set Rule Object Converter is invoked to populate that rule object. The Active Succession Set Rule Object Converter will retrieve all the active evidence rows in the succession set and use them to populate the attribute values on the rule object.

The values of the evidence fields are used to map to identically-named rule attributes on the rule class. Any evidence field without a corresponding rule attribute is ignored. Evidence fields are defined by:

When populating a particular attribute value on a rule object, the behavior of the Active Succession Set Rule Object Converter differs according to whether the rule attribute's type is a Timeline. The Active Succession Set Rule Object Converter also contains special processing to populate rule attributes to point to rule objects for related succession sets.

The following sections detail how the Active Succession Set Rule Object Converter populates timeline and non-timeline data, and relationship data, along with some useful rule attributes inherited from the ActiveSuccessionSet rule class.

Timeline-based data types

If the data type of the attribute is Timeline< some data type >, then the Active Succession Set Rule Object Converter allows the possibility of the evidence value to differ (across different evidence versions in the succession set).

The identification of the "lifetime" of the succession set depends on the use of the SuccessionSetPopulation annotation on the rule class (see SuccessionSetPopulation).

The Active Succession Set Rule Object Converter will form a timeline value from the evidence versions as follows:

Tip: Because only values from within the evidence lifetime are used, then typically the timeline value will change to the default value on the day after the end date for the evidence (if any).

Non-timeline data types

If the data type of the attribute is not Timeline< some data type >, then the Active Succession Set Rule Object Converter does not allow the possibility of the evidence value to differ (across different evidence versions in the succession set). Ordinarily each version of evidence in the succession set should bear the same data value for the evidence field, and this single data value will be used to populate the rule attribute value.

However, it is possible that for such fields, either the rules designer has made an incorrect assumption that the data should not change over time, and/or a case worker has not consistently applied a correction to data consistently across the versions in the succession set. In these circumstances, the value of the evidence field may be inconsistent across the versions in the succession set, and if so the Active Succession Set Rule Object Converter will:

Tip: If you see many warnings in your application logs pertaining to inconsistent evidence data, you should revisit your evidence and/or rule class design to resolve the inconsistency.

It is especially important to investigate any warnings which pertain to evidence fields which are designated as the start or end date of your succession set's lifetime, as any errors in such dates can lead to unreliable timelines being used to populate CER attribute values.

For more information about whether data should be modeled as a Timeline or not, see "What Is Timeline Data?" in the Cúram Express Rules Reference Manual.

Population of relationships to rule objects for other succession sets

When a succession set of active evidence is converted into a rule object, then any rule attributes which are annotated with relatedSuccessionSet will be automatically populated with rule objects for related succession sets:

The type of the related evidence is identified from the type of the attribute, which can either be a rule class (extending ActiveSuccessionSet) or a list of such rule classes. The behavior of the Active Succession Set Rule Object Converter differs according to whether a list is used:

Table 1. Population of related ActiveSuccessionSet rule objects
Number of related versions found Value propagated when attribute type is a rule class Value propagated when attribute type is a List<rule class>
0 null Empty list
1 The rule object for the related succession set found A list with a single item (the rule object for the related succession set found)
many (An exception is thrown at population time) A list with the rule objects for all the related succession sets found
Note: Typically in evidence design, a parent evidence item has 0, 1 or many child items (of a given type), while each child evidence item relates to exactly 1 parent.

However, the evidence infrastructure does not impose any constraints in this area, and so on occasion you may encounter child evidence types which relate to multiple parent types, and/or parent evidence types which expect only a single child evidence type.

Tip: The relationships between parent and child rule objects are not stored as timelines - a relationship between a parent and child rule object holds "for all time", even outside the parent or child's lifetime.

Typically any rules for the parent rule object, which retrieve the related children, will make reference to the lifetime of the child rule object (i.e. will use the value of the child's exists timeline (see Conversion Processing).

Rule attributes inherited from ActiveSuccessionSet

Each rule class targeted by the Active Succession Set Rule Object Converter must ultimately extend the PropagatorRuleSet.ActiveSuccessionSet rule class, and so will inherit the following rule attributes:

Tip: The exists rule attribute can be useful for certain eligibility/entitlement calculations.

For example, if a particular objective is attained whenever one of the parents of a minor is absent from the household, and periods of Absence are recorded as succession sets of evidence (with start and end dates naturally mapping to the start and end of the period of absence), then the value of the objective's isEntitledTimeline is (in pseudo-code, using appropriate timeline operations):

  • Get the periods of absence for the minor's parents;
  • Entitled when any:
    • (iterate through the periods of absence)
      • the current period of absence "exists"

Handling of in-edit evidence changes

In general, the Active Succession Set Rule Object Converter ignores in-edit pending changes to evidence.

However, during manual determinations using in-edit evidence, the Active Succession Set Rule Object Converter supports a special processing mode to allow in-edit pending changes to be taken into account. See Temporary Access to In-Edit Evidence Changes for more details.

Restrictions on Access

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

You may only specify the retrievedattribute to be the caseID.

If you attempt to specify a retrievedattribute to be the name of any other attribute, then the Active Succession Set Rule Object Converter will throw a runtime exception when the CER <readall>/<match> expression is executed.

Tip: If you require only some of the active evidence row evidence of a given type for a case, then consider wrapping the <readall>/<match> expression within a <filter> expression to return only the data you require, e.g. use <readall>/<match> matching on caseID to find all the Income active succession set rule objects for a case, and then use a <filter> to restrict the rule objects to just those for a particular member of the case.

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.

CAUTION:
Do not use a <readall> without a <match>.

Such an unqualified <readall> would typically retrieve a very large number of rule objects and no dependency on the overall set of rule objects will be stored.

1 As for all timelines, any contiguous values which are identical are combined into a single interval.

This can occur when two neighboring versions of evidence have the same value for an evidence field - the second version of the evidence has been recorded because a different evidence field has changed value.

See the example where two neighboring evidence rows have the same value for amount, because only the employmentStatus has changed.