Implementing Cloud API graph-based retrieval

This topic only applies to ClaimCenter.

  1. Modify the existing IPolicySearchAdapter plugin registry so that it points to the internal GraphBasedPolicySearchAndRetrieveAdapterImpl class.

    1. For more information, see Modify the existing IPolicySearchAdapter plugin registry.

  2. Register a new plugin registry for the IFallbackPolicySearchPlugin plugin.

    1. For more information, see Register the IFallbackPolicySearchPlugin plugin.

  3. Point the IFallbackPolicySearchPlugin plugin to the class that implements the non-graph-based search and retrieval functionality.

    1. For insurers with existing search and retrieval logic, this is probably the class that the IPolicySearchAdapter plugin previously pointed to.

    2. For insurers with no existing search and retrieval logic, this is a new class.

    3. For more information, see Register the IFallbackPolicySearchPlugin plugin.

  4. Register a new plugin registry for the ICloudRetrievePolicyPlugin plugin. Point it to a new class that implements the ICloudRetrievePolicyPlugin interface.

    1. For more information, see Register the ICloudRetrievePolicyPlugin plugin.

  5. In the ICloudRetrievePolicyPlugin implementation class:

    1. Implement the shouldUseGraphRetrieveForPolicyType method. This method must return true if the policy in question is supposed to be retrieved as a policy graph, and false if the policy in question is supposed to fall back to the IFallbackPolicySearchPlugin plugin's retrievePolicyFromPolicySummary method. For more information, see Implement the shouldUseGraphRetrieveForPolicyType method.

    2. Implement the getPolicyGraph method. This method must return a JSON string that adheres to the Policy graph schema. For more information, see Implement the getPolicyGraph method.

If your implementation supports policy refresh, there are additional configuration steps you must take. For more information, see Cloud API graph-based policy refresh.

Modify the existing IPolicySearchAdapter plugin registry

If your implementation of ClaimCenter will use graph-based policy retrieval for some or all of the policies retrieved, then the IPolicySearchAdapter plugin registry must point to the following Java class:

gw.plugin.policy.cloud.GraphBasedPolicySearchAndRetrieveAdapterImpl

Note that this is an internal Java class that cannot be modified.

Register the IFallbackPolicySearchPlugin plugin

In the base configuration, there is no plugin registry for the IFallbackPolicySearchPlugin plugin. To implement this plugin, you must do the following:

  1. If you have no existing code for policy search and retrieval, then you create a class that implements the IPolicySearchAdapter interface. Within this class, you must provide implementations for the methods that execute policy search and policy retrieval for non-graph-based policies. For more information, see the Integrations, Plugins, and Web Services.

  2. Create a new plugin registry.

    1. Set Name to IFallbackPolicySearchPlugin.

    2. Set Interface to IFallbackPolicySearchPlugin.

  3. Point the plugin registry to the class that implements the IPolicySearchAdapter logic. This could be an existing class or one created in the first step of this procedure.

Register the ICloudRetrievePolicyPlugin plugin

In the base configuration, there is no plugin registry for the ICloudRetrievePolicyPlugin plugin. To implement this plugin, you must do the following:

  1. Create a new class that implements the ICloudRetrievePolicyPlugin interface.

  2. Create a new plugin registry.

    1. Set Name to ICloudRetrievePolicyPlugin.

    2. Set Interface to ICloudRetrievePolicyPlugin.

  3. Point the plugin registry to the class created in the first step of this procedure.

Implement the shouldUseGraphRetrieveForPolicyType method

Within the ICloudRetrievePolicyPlugin implementation class, you must implement the shouldUseGraphRetrieveForPolicyType method. This method receives a PolicyType value. It returns a Boolean.

  • If it returns true, then the policy is retrieved as a policy graph. (In other words, it is retrieved using the ICloudRetrievePolicyPlugin.getPolicyGraph method.)

  • If it returns false, then the policy is retrieved using some other type of integration logic. (In other words, it is retrieved using the IFallbackPolicySearchPlugin.retrievePolicyFromPolicySummary method.)

For example, the following implementation returns true for Personal Auto policies and false for all other types.
override function shouldUseGraphRetrieveForPolicyType(policyType : PolicyType) : boolean {
 return (policyType == PolicyType.TC_PERSONALAUTO)
}

Implement the getPolicyGraph method

Within the ICloudRetrievePolicyPlugin implementation class, you must implement the getPolicyGraph method. This method receives a policySummary value. It returns a String that must consist of well-formed JSON that adheres to the Policy graph schema.

The default implementation of this method is as follows.
override function getPolicyGraph(@NotNull policySummary : PolicySummary) : String {
 return null
}

The manner in which you implement this method depends on the nature of the data stored in the Policy Administration System and the place where you want to store the code that converts that information into Policy-schema compliant JSON.

To view an example of what this method might return, see Cloud API getPolicyGraph sample return value.