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
-
At a command prompt, navigate to the PolicyCenter installation folder, and then start
Guidewire Studio™ for PolicyCenter by entering the following command:
gwb studio - In Guidewire Studio for PolicyCenter, open the Project window.
-
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> -
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> - In the Project window, expand .
-
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.
-
In the Registry editor, click Remove Plugin
.
-
Click Add Plugin
and, in the drop-down menu, choose Add Gosu Plugin to register the new plugin
implementation.
-
In the Gosu Class field, enter the following class:
gw.plugin.contact.ab1000.ABContactSystemPlugin
-
If necessary, start ContactManager.
At a command prompt, navigate to the ContactManager installation folder and enter the following command:
gwb runServer - In the Guidewire Studio for PolicyCenter Project window, navigate to and then to wsi.remote.gw.webservice.ab.ab1000.wsc.
-
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?wsdlThe
${ab}variable in this path corresponds to theproduct name="ab"entry in the suite-config.xml file that specifies the URL for ContactManager. -
With ContactManager running, click Fetch
to get the latest updates to ABContactAPI.
-
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 theClientAppPCuser 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. - 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.
-
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.
-
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} -
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, andanytagview. - 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.
- In your class’s getAdminUserForIntegrationHandling method, replace the parameter admin with the login name of your user.
- Navigate to and register your class in the plugin registry ContactMessageTransport.gwp.
-
You must designate a user of your own to handle this activity.
- Close Guidewire Studio for PolicyCenter.
