Cloud Retrofit with APD App

Users that have the APD App can use the following steps to generate LOB-specific endpoints for products that were not created in APD.
After reading this topic, you'll be able to:
  • Define the product with template configuration files.
  • Use PolicyCenter to export the product template to a ZIP file.
  • Create the product from the template in the APD app.
  • Create or modify the codegen file, as needed.
  • Use PolicyCenter to generate the endpoints.
  • Delete the product from the APD App.

Instructions

Step 1: Define the product in the template configuration files

About this task

Template gen config files allow you to change default values and define configuration details that cannot be automatically inferred from the data model when generating the REST APIs. For more information on the files in this process, see Files required for Cloud Retrofit process.

Procedure

  1. If you want to generate endpoints for a LOB that was included in the base configuration of a previous release, you need to remove its associated LOB-specific entries from the template_gen_config.xml. Guidewire provides default entries in the template_gen_config.xml file to facilitate Cloud Retrofit for users that do not have the APD App.
    1. In Studio, open the template_gen_config.xml
    2. Search for a PolicyLine XML node for the LOB. For example, you can search for <PolicyLine code="PersonalAutoLine">.
    3. Delete the entries for the LOB.
      Note: Do not remove existing PolicyLine entries for LOBs that you are not generating endpoints for using this particular process.
  2. Choose one of the following options to define a template_gen_config.lob_prefix.yaml file.
    OptionDescription
    Define the template_gen_config.lob_prefix.yaml from scratch See Define a Template Gen Config file for a LOB from scratch
    Define a template_gen_config.lob_prefix.yaml from a generated file See Define a Template Gen Config file for a LOB from a generated file
  3. Optional: Edit the template_gen_config.all.yaml file to ignore NumAddInsured.
    1. In Studio, open the file template_gen_config.all.yaml.
    2. As part of the PolicyLine entity, add an entry to ignore the NumAddInsured field so that it is not generated as an APD attribute of the LOB. Add the last two lines of the following code snippet:
      PolicyLine:
         fields:
            PatternCode:
               ignored: true
            NumAddInsured:
               ignored: true
      This field was not used in the LOBs that were included in the base configuration of previous releases, so it is unlikely that there are any occurrences.
  4. Edit or create the lob_prefix_codegen_config_ext-1.0.yaml file.
    This file is used for generating the LOB-specific endpoints.
    1. Verify the contents of the file and make sure it is compatible with any changes to the product and the template generator configuration.
    2. Make sure the file complies with the rules for codegen config file syntax.

Step 2: Export the product

Procedure

  1. In PolicyCenter, select Administration > Product Management. Then, select the Externally Managed tab.
  2. Select the LOB and select Export Product.
    Selecting Export Product creates and exports a JSON representation of the LOB. A ZIP file with the name of the LOB is saved to your Downloads folder.
  3. Check the server log for errors and warnings and address them.
    Review the server log for errors and warnings, and specifically for WARN Application.APD messages that are output as part of generating the JSON template. These warnings include information about pieces of the product that appear to be missing appropriate configuration in template_gen_config.lob_prefix.yaml, for example children that are not configured as coverables or exposures, field names that are not compatible with APD, and other problems that may occur during code generation. For example, you might see the error message The field name Type is not a legal APD field name. Use the template_gen_config file to add an appropriate override for the field name to something legal.
  4. Export the product again and check the server log for any remaining warnings or errors.
  5. Save the LOB template ZIP file for your records.

Step 3: Create a new product in APD App

Procedure

  1. On the Insurance Products page of the APD App, select Create New Product.
  2. Select the From Template tab.
  3. Select the LOB template ZIP file.
  4. Select Create.
    A tile for the new product appears.

Step 4: Create or modify the codegen config file

A codegen config file is a file that provides PolicyCenter with information about how to generate LOB-specific endpoints for a given non-APD-native product. For more information, see Codegen config files.

Step 5: Synchronize PolicyCenter with APD and generate the endpoints

Before you begin

In PolicyCenter Preferences, set the Product Design Mode to Developer.

Procedure

  1. In PolicyCenter, select Administration > Product Management. Then, select the APD Managed tab
  2. Click Synchronize With Cloud or click Import From Cloud and type the product identifier.
    To find the product identifier:
    1. In APD, click the product's tile to display the product.
    2. In the Navigation pane, select the product node.
    3. Click View [Product Name].
      Product Identifier appears in Element Details and also in the URL.
  3. Select the product from the list.
  4. Generate the product code.
    1. Click Generate Product Code.
    2. Review the warnings at the top of the screen and in the list of elements. Perform updates to the codegen config file,as needed.
    3. In Generate Options, verify that the System APIs - Code is set to Default Directory.
    4. Click Complete Generation and then click OK to confirm.
      The following message appears: Code has been successfully generated.

Step 6: Delete the product from APD App

About this task

While you can use the APD App to generate the endpoints, the product cannot be maintained in the APD App. Therefore, delete the product from APD App after you successfully generate the endpoints.

Procedure

  1. On the Insurance Products page of the APD App, locate the tile associated with the product you want to delete.
  2. From the ... menu of the product you want to delete, select Remove product.

Results

Removing this product from the APD App is done to avoid confusions between products that can be maintained in the APD app and those that you add to the APD App to facilitate the generation of endpoints.

Next steps

  • To view the generated endpoints, restart the PolicyCenter server. For information on how to access the endpoints, see PolicyCenter Cloud API Consumer Guide
  • To regenerate the endpoints, verify that the product is no longer in the APD App and then repeat the steps in this procedure.