Raise underwriting issues in Gosu code

About this task

This topic describes how to raise underwriting issues using Gosu code.

Procedure

  1. 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.
  2. 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.
  3. Use the PolicyEvalContext.addIssue method to add underwriting issues. To raise underwriting issues, you need to write Gosu code which examines the PolicyPeriod and 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.
    1. Add an addIssue method (using one the available method signatures). For example:
      addIssue( issueType, key, shortDescriptionBlock, longDescriptionBlock, value)
    2. Provide values for issueType and key:

      issueType

      Code from the Underwriting Rule Details in the underwriting Rule definition. Becomes UWIssue.Code.

      key

      Issue Key in the Underwriting Issue Details on the underwriting Rule definition. Becomes UWIssue.IssueKey.

    3. Provide a block for the shortDescription and 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
    4. Enter the value, which is the value that PolicyCenter checks to determine whether to raise the issue.
  4. Use the PolicyEvalContext.removeOrphanedIssues method to remove orphaned underwriting issues. The removeOrphanedIssues method is called in the PolicyEvalContext plugin.