Determining whether to add or reprint a form
The important method for creating inference
data is the FormData property
accessor function ShouldBeAdded.
The application calls this only after your FormData object creates inference
data. It must return true
if the form is part of the policy, or false
if the form is irrelevant to the policy with the current policy data.
Returning true from this
method does not guarantee PolicyCenter adds the form. This is affected
by other properties such as the processing type specified in the FormPattern in Product Designer,
the group code, and whether the XML data changes and triggers reprinting.
PolicyCenter only calls this after your FormData object creates inference data. A simple way of implementing this method is to check whether your inference data in your private variable is non-empty.
As an example, the inference class described earlier in this section could use the code shown below.
override property get ShouldBeAdded() : boolean {
return !_towingInfo.Empty
}
This method returns true only if the private variable for inference data contains a non-empty
list.
