Quote purging plugin
PolicyCenter provides the PurgePlugin plugin interface so
that you can modify the behavior of quote purging. The Purge batch process calls the methods
and property getters in this plugin.
PolicyCenter provides a built-in implementation
of this plugin, called PCPurgePlugin,
which implements the PurgePlugin
plugin interface. If you need to customize quote purging, you can create
your own class that implements this plugin interface.
The base configuration of PolicyCenter
uses a built-in implementation of the plugin, PCPurgePlugin.gs. To edit the
registry for PurgePlugin,
in Studio, navigate to ,
and open the PurgePlugin.gwp
file.
See also
- Quote purging
- Configuring quote purging
- Quote purging batch processes
- Quote purging configuration parameters
Create context
The createContext method takes as input a PurgeContext object and returns a new ExtendedContext object. The ExtendedContext object is passed from the prepareForPurge method to the postPurge method. The createContext method sets up the object before it is passed to the prepareForPurge method.
In the base configuration, the PCPurgePlugin class simply returns the input PurgeContext object in the createContext method.
In your implementation of the PurgePlugin plugin interface, you can modify
the ExtendedContext object. You can also create subclasses of this
object.
In your implementation, you can also modify the createContext method. For example, based on business logic you can determine which subclass of the ExtendedContext object to return.
Prepare for purge
The prepareForPurge method takes as input the PurgeContext object. This method can modify the PurgeContext object and take actions before the batch process evaluates whether the job can be purged or pruned. The PurgeContext object is passed to the postPurge method.
In the base configuration, the PCPurgePlugin class stores the public ID of the object to be considered for purging in the PurgeContext object the prepareForPurge method.
In your implementation of the PurgePlugin plugin interface, you can modify
the prepareForPurge method to take actions before the work queue
evaluates whether to purge the policy period. For example, you might modify the
prepareForPurge method to perform the following operations.
- Make changes to the policy period
- Write to the log file
- Gather statistics from the policy period
Guidewire does not support configuring quote purging to remove archived policy periods.
Take actions after purge
The postPurge method takes actions after the policy period has been
purged. This method is called only if the job is purged. The PurgeContext
is passed into this method.
In the base configuration, the PCPurgePlugin class takes not actions in the postPurge method.
In your implementation of the PurgePlugin plugin interface, you can modify
this method to take actions after purge such writing to the log file a message that the
purge completed.
Skip policy period for purge
The skipPolicyPeriodForPurge method takes as input a
PolicyPeriod and returns a Boolean value indicating whether to skip
purging the policy period. The method returns true to signal not purging a
policy period.
In the base configuration, the PCPurgePlugin always returns
false in the skipPolicyPeriodForPurge method.
In your implementation of the PurgePlugin plugin interface, you can modify
this method to signal not purging certain types of policy periods.
Skip orphaned policy period for purge
The skipOrphanedPolicyPeriodForPurge method takes as input an orphaned
PolicyPeriod and returns a Boolean value indicating whether to skip
purging the policy period. Preempted jobs create orphaned policy periods, which are policy
periods not associated with a job. To signal skipping an orphaned policy period, return
true.
In the base configuration, the PCPurgePlugin class always returns
false in the skipOrphanedPolicyPeriodForPurge
method.
In your implementation of the PurgePlugin plugin interface, you can modify
this method to signal skipping certain types of orphaned policy periods.
Get allowed job subtypes for purging
The AllowedJobSubtypesForPurging property getter returns a list of job
subtypes that can be purged.
In the base configuration, the PCPurgePlugin class has the following job
subtypes in the AllowedJobSubtypesForPurging property getter.
SubmissionPolicyChange
In your implementation of the PurgePlugin plugin interface, you can add or
remove job subtypes from the list.
Guidewire recommends that you not include the Audit job subtype. The final
status of an audit job’s PolicyPeriod is not Promoted or
Bound. Therefore, the filtering criteria for the Purge batch process will
not work as expected.
Get allowed job subtypes for pruning
The AllowedJobSubtypesForPruning property getter returns a list of job
subtypes that can be pruned.
In the base configuration, the PCPurgePlugin class has the following the
job subtypes in the AllowedJobSubtypesForPruning property getter.
SubmissionPolicyChangeRenewal
In your implementation of the PurgePlugin plugin interface, you can add or
remove job subtypes from the list.
Guidewire recommends that you not include the Audit job subtype. The final
status of an audit job’s PolicyPeriod is not Bound.
Therefore, the filtering criteria for the Purge batch process will not work as expected.
Calculate next purge check date
The calculateNextPurgeCheckDate method takes as input a job and
calculates the date after which the job can be checked for purging by the Purge batch
process. The NextPurgeCheckDate property is on the
Job.
PurgeStatus property of the Job and takes the following
actions in the calculateNextPurgeCheckDate method.|
|
Action |
|---|---|
|
|
This status indicates that no purging is necessary. The code simply returns
|
|
|
This status indicates that the job has no alternate versions to prune. This job is not in need of pruning, but the job may be in need of purging. Therefore the code calculates and returns the purge recheck date. |
|
|
This status indicates that the job purge status is not known. This job may be in need of pruning or purging. Therefore the code calculates the prune and purge recheck dates. The code compares these two dates and returns the earlier date. |
Get purge job date
The getPurgeJobDate method takes as input a Job and
determines the date on or after which the job can be purged.
PCPurgePlugin plugin class performs the following
operations in the getPurgeJobDate method.- Calculates the purge date for closed jobs.
- Calculates the purge date based on the number of days that must pass after the end of
a job’s selected policy. This is defined in the
PurgeJobsPolicyTermDays parameter.
If
PurgeJobsPolicyTermDaysCheckDisabledistrue, then this date isnull. - Compares the two purge dates, and return the later date. The job can be purged on or after this date.
Get prune job date
The getPruneJobDate method takes as input a Job and
determines the date on or after which the job’s unselected policy periods can be pruned.
- Calculates the prune date for closed jobs.
- Calculates the prune date based on the number of days that must pass after the end of
a job’s selected policy. This is defined in the
PruneVersionsPolicyTermDays parameter.
If
PruneVersionsPolicyTermDaysCheckDisabledistrue, then this date isnull. - Compares the two prune dates, and return the later date.
Disable purging archived policy periods
The disablePurgingArchivedPolicyPeriods method returns
true because purging archived policy periods is disabled. In the base
configuration, the PCPurgePlugin class always returns
true.
In your implementation of the PurgePlugin plugin interface, always return
true in the disablePurgingArchivedPolicyPeriods
method.
Guidewire does not support configuring quote purging to remove archived policy periods.
Purge context object
The gw.plugin.purge.PurgeContext object is used to pass information
before purging (prepareForPurge method) and after purging
(postPurge method). You can extend this object by creating a subclass
with additional properties and returning an instance of the subclass in place of
PurgeContext. The base PurgeContext object and methods
are not modifiable. The purge context specifies properties that identify the entity being
purged and the entity’s parents. These properties are listed below.
|
Property |
Description |
|---|---|
|
|
Contains one of the following items.
|
|
|
The job being purged or the parent job of the policy period being purged, if any. |
|
|
The policy period being purged. |
|
|
Boolean. Value is |
|
|
Boolean. Value is |
|
|
Boolean. Value is |
You can extend the PurgeContext object by adding additional properties. For an example, see the PurgePlugin class which contains a static inner class ExtendedContext.
If you extend the PurgeContext object, Guidewire recommends that these properties contain data values rather than entity references. Never add a property with an entity reference belonging to the domain graph of the purged object because the purged object does not exist after the purge.
