Accessing risk assessment interactively
When accessing Spotlight interactive service, you can go to the Spotlight application from PolicyCenter by clicking View in Spotlight on the Location Information screen. In Spotlight, you can examine the location and its surroundings, and perform risk evaluations. You can also move the location pin for longitude and latitude. Spotlight risk assessment service provides risk data. Then you can return to PolicyCenter.
The following illustration shows the Spotlight interactive and risk assessment flow in PolicyCenter.
For interactive risk assessment flow, the following steps correspond to the numbers in the previous illustration.
- PolicyCenter When the user clicks
Evaluate in Spotlight, PolicyCenter sets a variable
indicating that this button was clicked. Then PolicyCenter stores the current policy
location data into the
OutboundLocationRiskAssessmentTempStore,OutboundPeriodRiskAssessmentTempStore, andOutboundReinsurableRiskAssessmentTempStoretemporary objects. PolicyCenter uses these objects to match the data that the risk assessment service returns.For new locations that do not have latitude and longitude, PolicyCenter sends a formatted address. The AddressFormatter class formats the address into a globalized address. In your customization, pass the fields you require into the formatter. In the base configuration, the fields are stored in a static function called
GeoCodableAddressFieldsin SpotlightConfigParameters.gs.Policy Center passes three parameters to Spotlight through the URL. These parameters are used in requests to transfer JSON data from Spotlight to PolicyCenter.
policySystemServer– Base URL which prepends the other two page parametersencodedLocationDetailRequestPage– Page for requesting location details from PolicyCenter including location public IDencodedReturnPage– Page for returning from Spotlight to PolicyCenter to display the risk assessment calculated by Spotlight
The URL is in the following format:
https://SpotlightURL/urlPrefix/policySystemServer/ paramsUrlFragment/encodedLocationDetailRequestPage/returnUrlFragment/encodedReturnPage - Spotlight After
PolicyCenter sends the public ID of the LocationForRiskAssessment
object to Spotlight, Spotlight sends a request to PolicyCenter to retrieve the
details of that location. The request is made through the
URL:
policySystemServer/encodedLocationDetailRequestPageIn PolicyCenter the request goes to SpotlightServlet.gs.
- PolicyCenter The
SpotlightServletdelegates to LocationDetailsRequestHandler.gs. - The
LocationDetailsRequestHandlergets the location details. - The
LocationDetailsRequestHandlerresponds to the request by sending JSON data from OutboundPolicyData.gs. Jackson is used to serialize and deserialize the JSON data. This class implements theJacksonEnabledSerializableinterface so that Jackson works with Gosu.Note: Guidewire recommends that you do not use polymorphic deserialization, or that you use it only with annotations on an individual class basis. Do not enable global default typing. - Spotlight At this point, the user can modify the location pin or risk profile in Spotlight, then click PolicyCenter to return to PolicyCenter. The Spotlight service uses the supplied latitude and longitude if present to identify the location, in preference to the address information.
- PolicyCenter When the
user initiates the return to PolicyCenter, a request is sent to the
URL:
policySystemServer/encodedReturnPageThe request arrives at SpotlightServlet.gs.
The request includes the location data as JSON data in a request parameter which is parsed with Jackson and stored in InboundPolicyRequestData.gs.
- The
SpotlightServletpasses control toSpotlightReturnToPCRequestHandler. SpotlightReturnToPCRequestHandlermatches the JSON data with temporary objects in database.- The request handler calls
PolicyLocationRiskAssessmentGatewaywith the matched temporary objects. The gateway ensures that the plugin methods are called correctly, checks permissions, and handles errors. - The gateway calls the
PolicyLocationRiskAssessmentPlugin. - Spotlight
PolicyLocationRiskAssessmentPlugincalls the Spotlight risk assessment service. The data is sent byOutboundPolicyData. - The risk assessment data is returned with
InboundRiskAssessmentData. - PolicyCenter The data is
persisted in
InboundLocationRiskAssessmentTempStore. The handler returns control toSpolightServlet. - Spotlight The servlet returns control to Spotlight.
- PolicyCenter Spotlight directs the URL back to PolicyCenter.
- In PolicyCenter, the Location Information screen displays the risk assessment data below the map. The risk assessment data includes Latitude, Longitude, and other fields.
When the user returns to PolicyCenter, the page reloads
the OutboundLocationRiskAssessmentTempStore
object which contains the risk assessment data in InboundLocationRiskAssessmentTempStore.
PolicyCenter reloads the thumbnail map to display the latitude and longitude picked in Spotlight if moved. When there is new risk assessment data, PolicyCenter displays a message below the thumbnail map saying Spotlight returned new data. You can choose whether or not to Use this new data. The data in InboundLocationRiskAssessmentTempStore object is added into the LocationRiskAssessment object if you choose to use the new data and click Ok. If you click Cancel, the risk assessment data is not stored into the policy graph. You can view the location in Spotlight multiple times and move the location pin each time resulting in different risk assessment values. Only the last risk assessment value is preserved into the policy graph when you select Ok.
You also see the risk assessment details after visiting Spotlight and clicking Evaluate. Next to the label Risk Profile: US Large Commercial, click Show to view risk assessments and details.
When the new risk assessment is accepted, a LocationRiskAssessment object is created and populated with risk assessment, including the hash of the data used to generate this risk assessment.
