Handling multiple instances of one form
In many business cases, each form (as defined
by a FormPattern) has
either zero or one instances of the forms valid on the policy at any
given time. For example, the personal auto line of business forms in
the reference implementation include various forms, but no more than
one of each form. For multiple vehicles, a single form lists all the
vehicles. However, sometimes your business case might require multiple
instances of the same form, such as listing one form multiple times for
each vehicle. PolicyCenter supports this feature, which is referred to
as multiplicity.
The most important part of handling multiplicity
is associating a certain object in the policy graph with a given instance
of your inference class, which is your FormData
subclass. PolicyCenter implements this link through an intermediate business
entity called FormAssociation.
You must create a subtype of FormAssociation
and add a single property on it that is a foreign key to the object that
it represents. For example, for a personal auto form associated with
single personal vehicle, create a new subtype of FormAssociation called PAVehicleFormAssociation. Add
a property to it called Vehicle
that links to the PersonalVehicle
entity.
If you have multiple instances of the
form, your Form has multiple
instances, each with its own instance of your inference class.
