Adding a new rate routine function

A rate routine function is a predefined function that you can include in a rate routine step. Rate routine functions are defined in Gosu classes. You can define your own functions by adding a Gosu method to these classes. The function can return a value of any type. Functions with a return value appear in the Operand column of a rate routine step. Void functions appear in the Instruction column. Void functions do not return a value. An example of a void function is logAmount.

The SharedRatingFunctions class in the gw.rating.flow.util package contains rating functions for use across product lines.

For line-specific functions, create a class that extends the class RatingFunctionSource. By extending this class, PolicyCenter calls your rate routine function class. Functions in this class appear on the policy lines specified in the availableForLine method. This method takes a policy line code String and returns true if the class supports that policy line. This class must implement the availableForLine method.

For example, the PARatingFunctions class in the gw.lob.pa.rating package implements rate routine functions only for the personal auto line.

A rate routine function cannot be a parameterized method. If you define a rate routine function as a parameterized method, it does not appear in the list of functions on the Select a Function screen. PolicyCenter sends a warning to the log file. For more information about parameterized methods, see Parameterizing a method.

See also