Extend parallel rating using DTOs to a line of business
These instructions provide general guidance.
Before you begin
About this task
You can view Gosu classes that implement DTOs for commercial property in Studio in the
gw.api.rating.dtobased.data.cp package. This code makes use of read-only
DTO classes that provide basic DTO implementations for entities commonly used in policies.
These classes include CoverageDTO and EffDatedDTO
among others. To access these classes, open a commercial property example, such as
CPBuildingCovDTO. This class extends CoverageDTO.
Press Ctrl and click CoverageDTO to open that
class.
Procedure
- For each rate routine note which of its parameters are entities and which entity fields from each of those entities are needed for the calculation. Each DTO needs to contain the fields of its corresponding entity that are used as operands in the rate routine and as arguments for table lookups.
-
In
gw.api.rating.dtobased.data.lob, where lob is the abbreviation for the line of business, make a DTO Gosu class for each entity that is being replaced. -
In the Gosu class, add the necessary variables to store the entity data. Numbers that
are used for calculation can be represented as
BigDecimaland fields that are used for table lookups can be represented asString. - Add a typecode for each DTO in CalcRoutineParamName.ttx.
- Using CPDTORatingEngine as a guide, make changes to the parallel rating engine to initialize the DTOs and load their data from the entities.
-
Modify each rate routine call replacing the parameter map with a map that includes the
DTOs, referenced by their typecodes, and the PolicyLine entity.
The rating engine calls the rate routine using the RateBook.executeCalcRoutine method.The PolicyLine entity must be in the parameter set and is required by internal rating code.
- In PolicyCenter, create a new parameter set that includes the DTOs, the PolicyLine entity, and any other parameters from the original parameter set that were not replaced by DTOs.
-
If necessary, create new rate table definitions to allow data from the DTO as an
argument for rate table lookup.
In commercial property for example, the BaseRate rate table definition (
cp_coverage_base_rate_dto) was reimplemented because it specified value providers forCOV_CODEandCAUSE_OF_LOSS. The new rate table definition is identical but does not specify any value providers. - Create new versions of rate routines that use the new parameter set and new rate table definitions. Replace entity references with DTOs.
- Create a new version of the rate book that includes the new rate routines and rate table definitions.
-
For each new rate table definition, you must newly import the rate table data.
-
Export the new DTO rate table to spreadsheet format to get the formatting for the
data.
You can now view and edit the content in Microsoft Excel.
- Export the old rate table to spreadsheet format.
- Copy the relevant columns to the spreadsheet for the new rate table.
- Import this spreadsheet into the new rate table.
- Now the rate book can be approved and promoted.
-
Export the new DTO rate table to spreadsheet format to get the formatting for the
data.
