Disabling product artifacts during testing

Multiple sets of product artifacts

During the development of an APD product, the product moves from a visualized product to a finalized product. However, product development does not always move in a single direction. Rather, it is typically an iterative process. Testing of the finalized product may uncover issues that require fixes to the visualized product. Once the visualized product has been fixed, it must be reinstalled as a finalized product and retested.

Thus, during product testing, it is not unusual to have two sets of product artifacts: one for the visualized product and one for the finalized product. Furthermore, these two sets of product artifacts are not necessarily in sync at all times.

Disabling product artifacts

The LOB-specific APIs use the product artifacts as the backing data source for the APIs. However, the LOB-specific APIs can only access one set of product artifacts at a time. Because there might be multiple sets of product artifacts, the system APIs give you the ability to disable either set of product artifacts. Disabling a set of product artifacts can also be useful when you have inadvertently created a line with internal errors that are significant enough that it could prevent PolicyCenter from running.

Every product has an Enable for REST API flag. When this flag is set to Disabled, the system APIs will not use the visualized product artifacts. This field is visible in Advanced Product Designer on the Product Definition screen only when the user's Product Design Mode preference is set to Developer.

Every installed product has a product file in the integration/apis/installedlobs directory. This is a YAML file whose name starts with the product's Abbreviation as defined on the Product Definition screen. If this file is renamed or removed, the system APIs will not use the finalized product artifacts.

Disabling product artifacts typically occurs in development environments only. This is because it is unlikely that a visualized product (or a product with significant errors) would be brought into a production environment.

Determining which product artifacts to use

If there is only a visualized set of product artifacts, the system APIs will use these artifacts. (However, if the visualized artifacts have been disabled, the system APIs will throw an error.)

If there is only a finalized set of product artifacts, the system APIs will use these artifacts. (However, if the finalized artifacts have been disabled, the system APIs will throw an error.)

If there is both a visualized set of product artifacts and a finalized set of product artifacts, the system APIs check the product's Enable for REST API flag.

  • If the flag is set to Enabled, the visualized set is used.
  • If the flag is set to Disabled (and the product file is in the installedlobs directory), the finalized set is used.

Disable a product's visualized artifacts

About this task

Disabling a visualized product is useful when you want to test the finalized product. It can also be useful when you have inadvertently created a line with internal errors that are significant enough that it could prevent PolicyCenter from running.

Procedure

  1. Set your Product Design Mode preference to Developer. (You can do this by selecting Preferences from the Options menu. The Options menu is represented by the gear icon in the upper right corner.)
  2. Navigate to the product's Product Definition screen.
  3. Set Enabled for REST API to Disabled.
  4. Restart PolicyCenter.

Results

PolicyCenter immediately disables the product's visualized artifacts.

Enable a product's visualized artifacts

About this task

Enabling a visualized product is useful when you have previously disabled the visualized product (for example, when testing the finalized product) and you now want to re-enable the visualized product (for example, to conduct further testing on the visualized product).

Procedure

  1. Set your Product Design Mode preference to Developer. (You can do this by selecting Preferences from the Options menu. The Options menu is represented by the gear icon in the upper right corner.)
  2. Navigate to the product's Product Definition screen.
  3. Set Enabled for REST API to Enabled.
  4. Restart PolicyCenter.

Results

PolicyCenter immediately enables the product's visualized artifacts.

Disable a product's installed artifacts

About this task

Disabling a finalized product can also be useful when you have inadvertently created a line with internal errors that are significant enough that it could prevent PolicyCenter from running.

Procedure

  1. In Windows Explorer, navigate to the integration/apis/installedlob directory.
  2. Either rename or delete the product file corresponding to the installed product.
  3. Restart PolicyCenter.

Results

PolicyCenter immediately disables the product's installed artifacts.