Motor vehicle record (MVR) plugin

PolicyCenter provides the IMotorVehicleRecordPlugin to request a motor vehicle record (MVR) from an external MVR service provider. The base configuration of PolicyCenter uses a built-in implementation, DemoMotorVehicleRecordPlugin.gs. To edit the registry for the IMotorVehicleRecordPlugin, in Studio, navigate to configuration > config > Plugins > registry, and open the IMotorVehicleRecordPlugin.gwp file.

Built-in implementation of the motor vehicle record plugin

The base configuration of PolicyCenter provides a built-in demonstration implementation of the Motor Vehicle Record plugin, DemoMotorVehicleRecordPlugin.gs. This plugin implementation does not integrate with a specific MVR service provider. Instead, it simulates the reception of MVR reports for U.S. drivers.

In the base configuration, the IMotorVehicleRecordPlugin is enabled and specifies its implementation class as gw.plugin.motorvehiclerecord.DemoMotorVehicleRecordPlugin. Use the code in this demonstration class as an example for writing your own motor vehicle record plugin implementation.

Writing a motor vehicle record plugin

To implement requests to a real motor vehicle record (MVR) provider, write your own Gosu class that implements the IMotorVehicleRecordPlugin interface. Your implementation is responsible for contacting an MVR service provider and returning MVR data to PolicyCenter. It is not responsible for determining whether PolicyCenter already has a report for the driver in its MVR repository or whether the report in the repository is stale.

Data used by the motor vehicle record plugin

The methods defined by the IMotorVehicleRecordPlugin interface and their internal implementations use these data-type interfaces defined in the gw.api.motorvehiclerecord package.

  • IMVROrder – Information about an MVR order, such as internal or provider request IDs and order status
  • IMVRSubject – Header information about an MVR order, including the search criteria for a driver
  • IMVRSearchCriteria – Search criteria for an MVR order, such as the driver’s name and date of birth
  • IMVRData – Incidents and licenses on a motor vehicle report
  • IMVRLicense – Details of a license on a motor vehicle report
  • IMVRIncident – Details of an incident on a motor vehicle report

Methods on the motor vehicle record plugin

The IMotorVehicleRecordPlugin interface defines three methods.

Method

Description

orderMVR

Sends an array of orders to the MVR service provider to request reports for specific drivers

getMVROrderResponse

Sends an array of orders to the MVR service provider asking which reports are ready

getMVRDetails

Sends an array of orders to the MVR service to obtain reports that are ready

Each methods accept an array of IMVRSubject instances as its sole input parameter.