Raise underwriting issues in Gosu code
About this task
This topic describes how to raise underwriting issues using Gosu code.
Procedure
- To raise underwriting issues for all lines of business, modify the default evaluator class, gw.lob.common.DefaultUnderwriterEvaluator.gs. To raise underwriting issues for a particular line of business, modify the evaluator class for that line of business, gw.lob.pa.PA_UnderwriterEvaluator.gs, for example.
- Find the appropriate method for the checking set. For example, to raise underwriting issues for the Renewal checking set, add code in the onRenewal method of the evaluator class. You can view and modify the correspondence between checking set and method in the AbstractUnderwriterEvaluator class.
-
Use the PolicyEvalContext.addIssue method to add underwriting issues. To raise underwriting issues, you need to write Gosu code which examines the
PolicyPeriodand determines whether to raise one or more issues of this type. For example, the code may raise multiple issues if the PolicyPeriod entity contains multiple items of the same type, such as cars or buildings.-
Add an addIssue method (using one the available method signatures). For example:
addIssue( issueType, key, shortDescriptionBlock, longDescriptionBlock, value) -
Provide values for
issueTypeandkey:issueTypeCode from the Underwriting Rule Details in the underwriting Rule definition. Becomes
UWIssue.Code.keyIssue Key in the Underwriting Issue Details on the underwriting Rule definition. Becomes
UWIssue.IssueKey. -
Provide a block for the
shortDescriptionand longDescription parameters (one each). This allows the method to localize the description text for all available locales. (PolicyCenter performs the localization as it evaluates the display key.) Use this format:shortDescriptionBlock = \ -> shortDescriptionDisplayKey longDescriptionBlock = \ -> longDescriptionDisplayKey -
Enter the
value, which is the value that PolicyCenter checks to determine whether to raise the issue.
-
Add an addIssue method (using one the available method signatures). For example:
-
Use the PolicyEvalContext.removeOrphanedIssues method to remove orphaned underwriting issues. The
removeOrphanedIssues method is called in the
PolicyEvalContextplugin.
