Audit Gosu classes
Gosu classes primarily control premium audits. The gw.job package
contains most of the audit code.
- AuditProcess.gs is the main class and contains methods for
audit. The JobProcess.gs contains general methods used by
different types of jobs.
This class extends the
JobProcessGosu class. The JobProcess class contains methods that allow you to get the job and the policy period. It auto assigns the user role, and checks to see if the job can be expired, or withdrawn, and checks if the job can be started as new.Methods in this class start the job as a draft, and verify the conditions for which the audit can be edited. For example, does the user have edit permissions? Is the job complete? A method checks to see if an audit package can be created. The complete method moves a policy period into the
AuditCompletestatus, marking the audit as complete. From then on the policy period is read-only, and any new work on the audit must be done by revising the audit. Lastly, since an audit can be waived through the waive method, it locks the audit and it too cannot be edited. - The
AuditInformationEnhancement.gsxfile contains methods that check to see if the audit is revisable. An audit is revisable if it is completed and was not waived, reversed, or already revised. - The
PolicyPeriodAuditEnhancement.gsxfile contains methods for the policy period that are related to audit. This enhancement contains methods to schedule audits and remove a final audit from a policy period.This enhancement also contains a reverseFinalAudits method which reverses audits. This method makes a call to the billing system to reverse charges related to the final audit. This method also sets the
AuditInformation.ReversalDateto the current date. You can see which audits have been reversed by examining theReversalDate.PolicyCenter indicates that a policy has been billed by making an integration call to the billing system and calling the
PolicyPeriod.markBilledfunction.
- The AuditScheduler.gs class contains methods for scheduling audits.
Modifying the audit process Gosu class
If you need to change or create new methods in the AuditProcess Gosu class, you can edit the class
directly or create a subclass (such as YourCompanyAuditProcess.gs).
For more information about job classes and job subclasses, see Configuring jobs.
If you create a subclass, you must modify the job process customization plugin. For more information, see Job process creation plugin.
Modifying the audit scheduler Gosu class
If you define a new audit type that requires
schedules, you must modify the AuditScheduler
Gosu class.
If you define a new audit type that requires schedules, add code that schedules the audits for a policy period. The scheduleAllAudits method creates schedules for the audit types in the base configuration. Define a method to schedule your new audit type. Call your method from the scheduleAllAudits method.
Methods in the AuditScheduler class call the
createAuditInformation
method on the AuditSchedulePattern
interface. The createAuditInformation
method creates an AuditInformation
entity instance but does not return a pointer to the instance. If you
need to modify the AuditInformation
entity instance, you can retrieve it by creating a query. For example,
you added properties to the AuditInformation
entity definition, and need to set these values in the entity instance.
After you retrieve the instance, set values for the properties you added.
The AuditInformation entity has properties for information defined in the audit schedule. The properties include values for the audit method, audit schedule type, start date, and due date, among others.
