Regenerating LOB-specific endpoints

When you generate LOB-specific endpoints, there may be compilation errors in the generated files. For example, this can occur if there are type or field name mismatches between the visualized product and the installed product. For more information on resolving these errors, see Correcting compile errors.

Once you have modified the codegen config file, you must regenerate the LOB-specific endpoints. However,PolicyCenter will not regenerate endpoints for the installed product if the only change you have made is to the codegen config file. You must take additional steps to enable the regeneration.

Regenerate endpoints by first removing the template

About this task

You can trigger endpoint regeneration by removing and re-importing the product template, and then generating the endpoints. This method is faster than the second method, which involves removing the generated files. But you can do this method only when already PolicyCenter is already running.

Procedure

  1. Navigate to the Product Management screen.
  2. Click the APD Managed tab.
  3. In the list of products, click the desired product. Then click Remove Product. The product is removed from the APD Managed tab.
  4. Reimport the template.
    1. Click Import Template.
    2. Click Browse, then navigate to the template's location and select the template.
    3. Click Update. It may take a few seconds for the template to load. Once it has been loaded, the product reappears on the APD Managed tab.
  5. Regenerate the endpoints.
    1. Select Generate Product Code > System APIs > System APIs - Code. APD App shows the Review Product Elements screen.
    2. Click Complete Generation.

Regenerating endpoints by first removing the generated files

You can trigger endpoint regeneration by removing the generated LOB-specific endpoint files, and the generating the endpoints. This usually takes longer than the first method, which involves removing and re-importing the product template. However, this method does not require PolicyCenter to be running. (If you generate LOB-specific endpoints with compile errors, and then you stop PolicyCenter, PolicyCenter will not restart until the compile errors are fixed or removed. At this point, the easiest option is usually to remove the generated files.)

To do this, search for and remove all files with the following in their names:

  • <productCode>_gen
  • <productCode>_ext

These files are place in the following directories in the modules\configuration directory:

  • config\integration\apis\ext\job\v1
  • config\integration\apis\ext\policy\v1
  • config\integration\apis\ext\policyperiod\v1
  • config\integration\mappings\ext\policyperiod\v1
  • config\integration\schemas\ext\policyperiod\v1
  • config\integration\updaters\ext\policyperiod\v1

Also, remove the following directory and its contents:

  • gsrc\gw\rest\ext\pc\policyperiod\<productCode>\v1

Once this is done, you can restart PolicyCenter and then regenerate the LOB-specific endpoints.