Extend the rating engine to execute new rate routines
About this task
If you add new rate routines in PolicyCenter,
you must extend the rating engine for the line of business specified
in the rate routine. The PCRatingPlugin
class calls the rating engine for each line of business. In the base
configuration, the rating engine classes that use rating management are
PARatingEngine and CPRatingEngine.
To extend the rating engine to execute new rate routines:
Procedure
-
In the rating engine, add code
that calls the RateBook.executeCalcRoutine
method. For example, to execute a new rate routine in personal auto,
modify the PARatingEngine
class in the
gw.lob.pa.ratingpackage.The method signature for executeCalcRoutine method is:
function executeCalcRoutine(code : String, costData : CostData<Cost, PolicyLine>, worksheetContainer : WorksheetEntryContainer, paramSet : Map<CalcRoutineParamName,Object>)The arguments are:
code– The rate routine code that uniquely identifies the rate routine, as aString.costData– The cost data object which contains properties you can use to calculate a rate, as aCostData.worksheetContainer– Holds information for rating worksheets. Rating worksheets describe the series of calculations to generate a rate, as aWorksheetEntryContainer. For more information, see Rating worksheets in Rating Management.paramSet– A map representing the parameters in the parameter set for the rate routine, as ajava.util.Map.
-
If the rate routines does not calculate properties on the cost, set the costData parameter to
nulland theworksheetContainerto aNoCostWorksheetContainer.For example, the following code in PARatingEngine.gs executes thepa_assign_driver_style1_rrrate routine:RateBook.executeCalcRoutine("pa_assign_driver_style1_rr", null, new NoCostWorksheetContainer(), assignDriverParameterMap)The PARatingEngine class is in the
gw.lob.pa.ratingpackage. TheNoCostWorksheetContainerstores data about what the rate routine executed. However, the default implementation of rating worksheets does not save this information to the database nor display it on the Rating Worksheet screen.The PARatingEngine class is in the
gw.lob.pa.ratingpackage. TheNoCostWorksheetContainerstores data about what the rate routine executed. However, the default implementation of rating worksheets does not save this information to the database nor display it on the Rating Worksheet screen.
What to do next
See also
