Template Gen Config XML File

When you perform Cloud Retrofit without APD App, you can add configuration to template_gen_config.xml so that the templates for lines of business generate successfully. For the Cloud Retrofit with APD App process, this file needs to be edited to remove LOB-specific information for LOBs that you create in the APD app.

For Cloud Retrofit without APD App, the following are examples of configurations you might need to add to template_gen_config.xml:
  • Define entities to treat as coverables in the APD model, in cases where the entity doesn't already implement the Coverable interface but has child coverables or exposures
  • Define entities to treat as exposures in the APD model
  • Mark fields as ignored that you don't want to appear in the APD model (such as internally-managed values)
  • Override field names in cases where the name is illegal in APD (such as "Type" or "Use") or you want a clearer name in the APD model (for example, the name contains cryptic abbreviations).

AllLines, AllTypes, and PolicyLine elements

The AllLines element includes configuration that applies to all lines of business. The PolicyLine element includes configuration that is specific to a LOB. You can configure Type and Field elements as children of these elements.

Type elements

When you define a Type element, you provide a name attribute and an additional attribute that specifies a property of that Type.

Possible properties of the Type element are the handling attribute and the autonumber attribute.
handling
Define this attribute for entities that do not implement a coverable or modifiable. Possible values are coverable, exposure, or location.
  • coverable: Treat this entity as a Coverable in the APD model. Use this handling value for entities with children that need to be included in the APD model but that aren't themselves Coverables.
  • exposure: Treat this entity as an Exposure in the APD model. Use this handling value for leaf entities that have no children and aren't Coverables.
  • location: Treat this entity as a Location-Based Coverable in the APD model.
If handling is not specified, default logic tries to automatically determine how to handle the entity with the following logic:
  • Entities that implement the Coverable delegate will be treated as coverables.
  • Entities that subtype the AddlInterestDetail entity will be treated as exposures.
  • Entities that implement the LineSpecificLocation delegate will be treated as locations.
  • Entities with no configured handling, and that aren't automatically detected as a coverable, exposure, or location-based coverable, will not be included in the resulting APD template.
Example:
<PolicyLine code="TSTLine">
    <Type name="TSTCfgCoverable" handling="coverable"/>
    <Type name="TSTConfiguredExposure" handling="exposure"/>
    ...
  </PolicyLine>
autonumber
For entities that are auto-numbered, this attribute specifies the auto-number column. Specifying a value causes the entity to be marked as auto-numbered in the APD model. The auto-number column itself will not appear in the APD model (its existence is implied by the auto-number flag, so it's not explicitly modeled), and the associated schema property will be read-only in generated APIs. If no value is specified, codegen assumes a value of "SequenceNumber."
Example:
<PolicyLine code="PersonalAutoLine">
    ...
    <Type name="PersonalVehicle" autonumber="true">
      <Field name="VehicleNumber" ignored="true"/>
    </Type>
    ...
  </PolicyLine>

Field elements

When you define a Field element, you add it as a child of a Type element. Each Field element has a name attribute and an additional attribute that specifies a property of that Field.

Possible properties of the Field elements are the templateName attribute, the ignored attribute, and the split attribute.
templateName
Use this attribute to override the field name in the template. By default the field name that is included in the template is the entity name. The primary reason for overriding the field name is for cases where the name is a reserved keyword in APD. For example, you might need to change a field named Use to VehicleUse or Type to WaiverType. You can also use this attribute in cases where you want to change a cryptically-named field to something more human readable.
Example:
<PolicyLine code="WorkersCompLine">
   <Type name="WCWaiverOfSubro" handling="exposure">
      <Field name="Type" templateName="WaiverType"/>
    </Type>
</PolicyLine>
Note: For each templateName attribute that you define in this file, configure the nameOverride at the field-level in the codegen config file to map the name you define for the APD template to the name defined in the installed product. For more information on working with codegen config files, see Codegen config files.
ignored
Set ignored to true to exclude a field from the APD model in the following cases:
  • The field is an implementation detail or internal bookkeeping, and does not represent a meaningful business value.
  • The field represents something that cannot be modeled in APD, for example an effective-dated foreign key to something other than PolicyLocation or PolicyContactRole.
If a field is not modeled in APD, it cannot be managed in APD. Furthermore:
  • When you generate code, the field is untouched in the eti file as only the pieces managed by APD are updated.
  • You must manually add the field to Cloud APIs.
Example:
<PolicyLine code="IMLine">
   ...
    <Type name="IMSign" autonumber="true">
      <Field name="SignNumber" ignored="true"/>
    </Type>
  </PolicyLine>
split
Set the split attribute to true to mark a field as SplitByRatingPeriods in the generated template. This value cannot be inferred automatically, so you must set it explicitly for any splittable fields, such as fields on Workers Comp employees or General Liability exposures.
Example:
<PolicyLine code="WorkersCompLine">
   ...
    <Type name="WCCoveredEmployee" handling="coverable">
      <Field name="AuditedAmount" split="true"/>
      <Field name="BasisAmount" split="true"/>
      <Field name="NumEmployees" split="true"/>
    </Type>
   ...
  </PolicyLine>