Integrate PolicyCenter with ContactManager

This step is the first in the multi-step process of integrating PolicyCenter and ContactManager.

About this task

This step is the first in the multi-step process of integrating ContactManager and PolicyCenter. For an overview of the integration process, see Integrating ContactManager with PolicyCenter in QuickStart.

Procedure

  1. At a command prompt, navigate to the PolicyCenter installation folder, and then start Guidewire Studio™ for PolicyCenter by entering the following command:
    gwb studio
  2. In Guidewire Studio for PolicyCenter, open the Project window.
  3. Press Ctrl+Shift+N and enter suite-config.xml to find this file, and then double-click the search result to open the file in the editor.

    This file defines the URLs of the applications in the Guidewire InsuranceSuite. If the entries in this file are commented out, you must remove the comments for the applications you have installed. In the default configuration, the Guidewire applications have the following settings in this file:

    <suite-config xmlns="http://guidewire.com/config/suite/suite-config">
      <!--<product name="cc" url="http://localhost:8080/cc"/>-->
      <!--<product name="pc" url="http://localhost:8180/pc"/>-->
      <!--<product name="ab" url="http://localhost:8280/ab"/>-->
      <!--<product name="bc" url="http://localhost:8580/bc"/>-->
    </suite-config>
  4. Remove the comments around the ContactManager (ab) entry, as follows:
    <suite-config xmlns="http://guidewire.com/config/suite/suite-config">
      <!--<product name="cc" url="http://localhost:8080/cc"/>-->
      <!--<product name="pc" url="http://localhost:8180/pc"/>-->
      <product name="ab" url="http://localhost:8280/ab"/>
      <!--<product name="bc" url="http://localhost:8580/bc"/>-->
    </suite-config>
  5. In the Project window, expand configuration > config > Plugins > registry.
  6. Double-click ContactSystemPlugin.gwp to change the plugin implementation used by the system to connect to ContactManager.

    By default, the system uses gw.plugin.contact.impl.StandAloneContactSystemPlugin. PolicyCenter uses this plugin when not connected to a contact management system. In the steps that follow, you replace this class with the plugin implementation that connects PolicyCenter with ContactManager.

  7. In the Registry editor, click Remove Plugin .
  8. Click Add Plugin and, in the drop-down menu, choose Add Gosu Plugin to register the new plugin implementation.
  9. In the Gosu Class field, enter the following class:
    gw.plugin.contact.ab1000.ABContactSystemPlugin
  10. If necessary, start ContactManager.

    At a command prompt, navigate to the ContactManager installation folder and enter the following command:

    gwb runServer
  11. In the Guidewire Studio for PolicyCenter Project window, navigate to configuration > gsrc and then to wsi.remote.gw.webservice.ab.ab1000.wsc.
  12. Double-click the ab1000.wsc web services collection to open the editor, and then, in the editor, click the following resource:
    ${ab}/ws/gw/webservice/ab/ab1000/abcontactapi/ABContactAPI?wsdl

    The ${ab} variable in this path corresponds to the product name="ab" entry in the suite-config.xml file that specifies the URL for ContactManager.

  13. With ContactManager running, click Fetch to get the latest updates to ABContactAPI.
  14. Ensure ContactManager sample data is loaded. See Load sample data for ContactManager. If sample data is not loaded and you do not want to load sample data, create the following user in ContactManager:
    Username = "ClientAppPC"
    Password = "gw"
    In the base configuration, the ABConfigurationProvider gosu class defines the ClientAppPC user credentials that PolicyCenter uses to authenticate with ContactManager when PolicyCenter makes calls to ABContactAPI. This user is included in ContactManager sample data.
    Important: Guidewire recommends that you change this user name and password in the ABConfigurationProvider gosu class and in ContactManager.
  15. In the Project window, press Ctrl+N and enter ContactMessageTransport. In the search results, double-click ContactMessageTransport to open this Gosu class in the editor.
  16. Press Ctrl+F and enter getAdminUserForIntegrationHandling to find that method in the class. The method is defined as follows:
    private function getAdminUserForIntegrationHandling() : User {
      return PLDependenciesGateway.getUserFinder().findByCredentialName("admin")
    }

    This method gets the PolicyCenter user that is assigned an activity if ContactManager throws an unhandled exception during communication with PolicyCenter. In response to the activity, this user reviews the contact’s data and makes the needed corrections. After the user updates the contact, PolicyCenter sends it to ContactManager again.

    1. You must designate a user of your own to handle this activity.

      The getAdminUserForIntegrationHandling method retrieves the user by login name. In the base configuration, this PolicyCenter user has all permissions. The generic text for the activity is:

        Subject: Failed to add the contact '{Contact}' to the CMS.
        Description: An unexpected error occurred when adding the contact to the contact management system\: 
          {Error Message}
    2. Assign the user roles with permissions that enable working with contacts.

      The contact and tag permissions in the base configuration are abcreate, ctccreate, anytagcreate, abdelete, ctcdelete, anytagdelete, abedit, ctcedit, anytagedit, abview, abviewsearch, ctcview, and anytagview.

    3. When you determine the user who will handle these activities, you can create your own class and copy the code in the ContactMessageTransport class into your class.
    4. In your class’s getAdminUserForIntegrationHandling method, replace the parameter admin with the login name of your user.
    5. Navigate to configuration > config > Plugins > registry and register your class in the plugin registry ContactMessageTransport.gwp.
  17. Close Guidewire Studio for PolicyCenter.

What to do next

Integrate ContactManager with PolicyCenter