Implement attributes and rule classes for sub-screen data

If your top-level screen allows rows to be expanded to show sub-screens, then you must create an attribute on your case rule class that returns a list of rule objects and annotate that attribute with the DisplaySubscreen annotation. This annotation allows the data to be searched by the Engine when a user expands a row of data. It is recommended that you name your attribute datatype Subscreens .

The rule objects returned in the list from your DisplaySubscreen attribute must ultimately extend the ProductDecisionDetailsRuleSet.AbstractCaseSubscreenDisplay rule class shipped by the Engine. For ease of upgrades, it is recommended that your rule class extends the DefaultProductDecisionDetailsRuleSet.DefaultCaseSubscreenDisplay rule class which provides default implementations.

Here is a description of the attributes inherited from AbstractCaseSubscreenDisplay:

Table 1. Rule attributes inherited from ProductDecisionDetailsRuleSet.AbstractCaseSubscreenDisplay
Rule Attribute name Data type Description
businessObjectID Number Identifier of the row being expanded (must be unique amongst all sibling rows).

Create a rule class which extends DefaultProductDecisionDetailsRuleSet.DefaultCaseSubscreenDisplay rule. It is recommended that you name your rule class Datatype Subscreen, in line with the attribute you created above.

Typically, instances of your rule class will be constructed passing some underlying eligibility/entitlement rule object to be displayed on the sub-screen. You must provide an implementation of businessObjectID on your sub-screen rule class, and typically this implementation will refer to some identifier on the underlying eligibility/entitlement rule object.

The implementation of the attribute on your case rule class will typically use CER's <dynamiclist> expression to create an instance of your rule class to wrap some eligibility/entitlement rule object.

For example, let's say that the AssetDisplay rule class in the previous section is used to populate a list of assets on the summary decision details screen, and that furthermore we want the user to be able to expand each asset to see further details such as purchase date and a list of valuations for that asset.

You would write the following:

It is possible that your top-level screen allows multiple types of expansion (i.e. your top-level screen shows multiple lists, each of which may be expanded). For each type of expansion, you must create separate DisplaySubscreen attributes in your case rule class.

It is also possible that your sub-screens also allow further drill down into sub-screens. In this situation, all data for the lower sub-screens still needs to be returned by a DisplaySubscreen attribute on your case rule class.

Tip: CER's <joinlists> expression can sometimes be useful to aggregate lists of lists into a single list in such a situation.