Define a Template Gen Config file for a LOB from scratch

Create a template configuration file for a line of business (LOB) to change default values and define configuration details that can't be automatically inferred from the data model when generating the REST APIs. You can create a template configuration file (template_gen_config.lob_prefix.yaml) for an LOB from scratch or you can generate it.

About this task

This task describes how to manually create the template configuration file for a LOB from scratch. For information on how to create the file from a generated template, see Define a Template Gen Config file for a LOB from a generated file.

Procedure

  1. Using any editor, create an outline of the entities associated with the line of business. Creating a diagram is optional.
    1. Start at PolicyLine.eti and find the subtype for the LOB.
    2. Document the arrays, foreign keys, one-to-ones, and autonumber sequences for the LOB's policy line entity.
    3. Repeat the process for any entities referenced using arrays, foreign keys, or one-to-ones that are LOB-specific and that do not represent Clauses, ScheduledItems, Modifiers, Answers, Costs, or Transactions.
  2. Create the template_gen_config.lob_prefix.yaml in the modules/configuration/config/apd/model/generate/json/ folder.
    Note: The lob_prefix is the code for the line that is found in the InstalledPolicyLine typelist. For consistency with YAML files in the base configuration, we recommend using the lowercase version of the line prefix. Guidewire may have a YAML file available for the LOB. Contact your Guidewire representative for support.
  3. Add the following properties to the template_gen_config.lob_prefix.yaml file.
    1. Add the lineCode. For more information, see The lineCode property.
    2. Under the types property, add each entity that has an autoNumberSequence. Then, configure the autoNumberColumn and parentAutoNumberSequenceColumn as needed. For more information on the sequencing options, see The types property.
    3. Under the types property, add each entity that does not implement either of the Coverable or Modifiable interfaces. Then, configure its handling as exposure, coverable, or location as needed. For more information on handling options, see The types property.
    4. Add the fieldName property to override each field that has the name of a reserved keyword.
      For example, the WCWaiverOfSubro entity has a field with a name of Type, which is not a legal field name in APD. The following entry overrides this field name with WaiverType:
      WCWaiverOfSubro:
         handling: exposure
         fields:
           Type:
             fieldName: WaiverType
      For more information on fieldName property, see The types property fields.
    5. As needed, add additional configurations or make additional modifications to entities under the types property, such as:
      • Add ignored and set it to true to exclude entities from the APD model.
      • Add a typeName to override the type name inferred for a coverable or exposure.
      For information on all the configuration options, see Template Gen Config YAML Files

What to do next

Complete the steps in Cloud Retrofit with APD App to continue the process of generating the LOB-specific endpoints for a non-APD native product.