Extending the DefaultProduct Rule Class

When building any product that requires an entitlement amount, you must define at least one objective type and one objective tag type. An objective is the output of a rules execution which represents, at a business level, what is being delivered to the claimant if they are deemed eligible. For benefit products, this will typically be a form of payment, for example, Max Child Allowance. An objective tag represents the rate at which the objective will be delivered, for example, weekly rate, daily rate etc. Objectives are used in the creation of financial schedules. The objective type indicates that the eligibility result will be a numerical amount. The objective tag is used to calculate the entitlement amount based on a frequency. During the creation of financial components, the objective and objective tags are used to create the financial schedules for eligible claimants.

In our simple product, you must extend the DefaultProduct rule class to include a SimpleObjectiveType and a DailyObjectiveTagType. The DailyObjectiveTagType requires the following attributes:

Table 1. Attributes for DailyObjectiveTagType
Attribute Description
tagTypeID This represents the unique identifier for the tag type.
name The name of the tag type, 'Daily Rate' for example.
pattern This attribute must be a valid frequency pattern; for example, daily would use the value "000100000".
valueType This attribute is defined using the codetableentry table="RulesTagType". For our simple product, the value type code is RTT3, Money.