Extend parallel rating using DTOs to a line of business

These instructions provide general guidance.

Before you begin

Convert the line of business to parallel rating. See Implementing parallel ratingConfiguration Guide.

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

  1. 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.
  • Define DTO classes
    1. 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.
    2. In the Gosu class, add the necessary variables to store the entity data. Numbers that are used for calculation can be represented as BigDecimal and fields that are used for table lookups can be represented as String.
    3. Add a typecode for each DTO in CalcRoutineParamName.ttx.
  • Rating engine
    1. Using CPDTORatingEngine as a guide, make changes to the parallel rating engine to initialize the DTOs and load their data from the entities.
    2. 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
    1. 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.
    2. 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 for COV_CODE and CAUSE_OF_LOSS. The new rate table definition is identical but does not specify any value providers.
    3. Create new versions of rate routines that use the new parameter set and new rate table definitions. Replace entity references with DTOs.
    4. Create a new version of the rate book that includes the new rate routines and rate table definitions.
    5. For each new rate table definition, you must newly import the rate table data.
      1. 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.
      2. Export the old rate table to spreadsheet format.
      3. Copy the relevant columns to the spreadsheet for the new rate table.
      4. Import this spreadsheet into the new rate table.
      5. Now the rate book can be approved and promoted.