Policy evaluation plugin
To customize how PolicyCenter raises underwriting
issues (UWIssue object)
on a policy period, implement the policy evaluation plugin interface,
IPolicyEvaluationPlugin.
PolicyCenter includes a built-in implementation that raises underwriting
issues and removes orphaned underwriting issues. The built-in implementation
accomplishes these tasks indirectly through other classes. You only need
to modify or reimplement this plugin if you choose an alternate way of
raising and removing underwriting issues. Most likely, you can use the
built-in implementation of this plugin without any modifications. To
raise and remove your underwriting issue types, you modify the evaluator
classes that this plugin uses indirectly.
If however, you choose an alternate way of raising and removing underwriting issues, the remainder of this topic provides guidance.
The plugin interface contains only one
method, called evaluatePeriod.
void evaluatePeriod(PolicyPeriod period, UWIssueCheckingPoint checkingPoint);Before returning from this method, your method must add all relevant underwriting issues (UWIssue objects) on the period. Additionally, the method must remove all orphaned underwriting issues.
One of the parameters is an underwriting
issue checking set typecode defined in the UWIssueCheckingSet typelist. The
typecode describes a point at which PolicyCenter can evaluate a policy
and generate an underwriting issue.
Each typecode contains a Priority property that indicates
the order within the typelist. High priority checking set are evaluated
first.
Use the typecode value to raise new issues appropriate for the policy. Next, remove any orphaned issues.
If you choose to modify this plugin, Guidewire recommends that your implementation use the PolicyEvalContext class to create and remove orphaned issues because these are complex and error-prone tasks. To add an issue, use the addIssue method on the PolicyEvalContext object.
The addIssue
method finds an existing UWIssue
with this type and key or, if no such issue exists, creates a new issue.
If this method returns a pre-existing issue, this method marks it as
touched by setting the HumanTouched
property to true. Because pre-existing issues are marked
touched, the removeOrphanedIssues
method (see later in this topic) does not remove them.
For example, you can create a new issue with the following code.
var context = new PolicyEvalContext(period, checkingPoint)
var newIssue = context.addIssue( "PAHighValueAuto", "testissue", "this is a longer description", null )
Just as in the built-in implementation, you can use the PolicyEvalContext object to remove old issues using the PolicyEvalContext.removeOrphanedIssues() method. That method removes or marks as inactive all issues for which both of the following conditions are true.
- The issue existed at the time PolicyCenter created the context object.
- No previous call to the
addIssue method on
PolicyEvalContextaffected this issue.
The method removes any issues that are open or marked no longer applicable. In contrast, for issues that are approved or declined, this method marks them as inactive.
See also
