Correcting compile errors

The first time that you generate LOB-specific endpoints for an installed product, the generated files may have compile errors. The primary cause of these compile errors are naming conflicts caused by field name truncation related to Advanced Product Designer.

Field truncation in APD App

Advanced Product Designer limits type and field names to a certain number of characters. The specific number varies based on the type or field itself. For example, type names are limited to 24 characters. For more information on APD name length limits, see Creating Products with APD App.

If a name in the product template exceeds the corresponding APD character limit, then when you import the template, Advanced Product Designer truncates the field name in the visualized product. When you generate endpoints from the visualized product, field names in the endpoints do not match the corresponding field names in the installed product. This results in compile errors in one or more generated LOB endpoint files.

Identifying the mismatch

You can identify files with compile errors using your IDE.

If you enable the installed product endpoints, you can also identify the compile errors in the PolicyCenter console and logs when you attempt to use the endpoints.

For example, suppose you have a Workers' Compensation product with a type named WCRetroRatingLetterOfCredit. When the product template is imported, the type name is truncated to WCRetroRatingLetterOfCre. This results in the following errors:

  • In the mapping file, there is an error stating Cannot resolve symbol: WCRetroRatingLetterOfCre.
  • If you attempt to use the endpoints, you will see errors such as: No property descriptor found for property, RetrospectiveRatingPlan, on class, entity.WCRetroRatingLetterOfCre.

Resolving the mismatch

Mismatches can happen at the type level and at the field level.

For each mismatch, you must first identify the correct name. This is the name that appears in the entity definition (the .eti or .ext file) for the corresponding data model entity.

Then, in the product's codegen config file, you must add a nameOverride property that maps the truncated visualized product name with the correct installed product name.

For example, to fix the error in the previous example, the Workers' Compensation codegen config file would need the following entry:
types:
  WCRetroRatingLetterOfCre:
    nameOverride: WCRetroRatingLetterOfCredit

For more information on working with codegen config files, see Codegen config files.

Finally, you must regenerate the endpoints. This recreates the LOB-specific endpoints files with the correct type and field names. For more information, see Regenerating LOB-specific endpoints.