Validate line before calculating premiums

About this task

Add code to ensure that all audit amount fields have values on the audit Details screen. For example, in the general liability line, the code checks that the auditor has entered a value in each Audited Payroll field. The value of the Audited Payroll field is the audit Details > Audited Basis field defined in Add audited basis to the data model.

Procedure

  1. In Studio, navigate to configuration > gsrc, and open gw.lob.line.lineLineValidation. For Golf Cart, open gw.log.go.GOLineValidation.
  2. Add the validateLineForAudit method. This method determines whether all audit amount fields have values prior to calculating premiums.
      override function validateLineForAudit() {
        allAuditAmountsShouldBeFilledIn()
      }
  3. Define the allAuditAmountsShouldBeFilledIn method. For example, in the general liability line, this method checks that all glExposure.AuditedBasis fields have a value.