PolicyLine objects
A PolicyLine object in Gosu is aware of the product model configuration of its pattern. For example, the coverages defined within the policy line pattern can be referenced from an instance of the PolicyLine object. Therefore, the following expression is valid:
var x = WCLine.WCEmpLiabCovHowever, the following expression causes a type error because the businessowners policy (BOP) line does not include workers’ compensation coverages:
var x = BOPLine.WCEmpLiabCovAs another example, consider
the WorkersCompLine pattern,
whose policy line subtype is WorkersCompLine.
(It is possible—but not required—for a policy line pattern to have
the same code as the subtype it creates.) The following definition occurs
in WorkersCompLine.eti:
<subtype entity="WorkersCompLine" displayName="Workers’ Comp"
desc="Workers’ Comp" supertype="PolicyLine" generateCode="true">
...
<typekey name="OtherStatesOpt" typelist="OtherStates" desc="Other states option for the coverage"/>
...
</subtype>
Therefore, the following Gosu is valid:
WCLine.OtherStatesOpt = "None" //Comes from the configuration dm files
var x = WCLine.WCEmpLiabCov //Comes from the product model configuration
The Gosu compiler merges the type information from the subtype definition and the product configuration to form the final type of the WorkersComp PolicyLine.
dm
files. Therefore, Guidewire recommends that you exercise extra care with
Policy objects in Java.