Mapping Additional Fields

Measurements and device event files received from head end systems can include additional fields containing data to be imported into Oracle Utilities Smart Grid Gateway. These additional fields must be mapped to elements within the measurements and device events processed by Smart Grid Gateway.

This mapping can be performed through use of a custom Groovy script, via the “On Result List” User Exit Interceptor specified in the SGG Payload Processing Configuration Extendable lookup.

Payload Processing Overview

This section provides an overview of the payload processing logic when mapping data in incoming measurements or device events.

Oracle Utilities Meter Data Framework Steps

  1. The file upload process program starts reading the file.
  2. The upload process creates an instance of the Payload Handler class specified on the SGG Payload Processing Configuration extendable lookup. This class handles the interaction with the User Exit Interceptor script.
  3. The upload process invokes the “On Result List” User Exit Interceptor. This executes a “handler” Groovy Library Script that returns an instance of a class that implements the com.splwg.d1.domain.sgg.dg.processing.PayloadProcessingCMHandler interface.

     This "CM payload handler" is initialized with a stream opened for the incoming file and a business object instance of SGG Payload Processing Configuration extendable lookup.

  4. The upload process parses data from the incoming document into the “Plain XML” format and transforms the Plain XML data into a set of Initial Measurements (IMDs) or/and Device Events in the “native” XML format and returns each as child nodes added to the Result List parent node.
  5. The upload process invokes the CM payload handler, passing the Result List parent node.
  6. The CM payload handler transforms data the Result List parent node based on the logic in the Handler script. See CM Payload Handler Steps, below.
  7. The upload process creates business object instances for all child nodes of the Result List.
  8. The process steps (4-9) are repeated until the process returns NULL on step 4 (when there are no further records to process).

CM Payload Handler Steps

  1. The CM payload handler reads the given measurement or device event inside the Result List node.
  2. The CM payload handler transforms specific data elements inside the measurement or device event (such as replacing a <externalUOM> element with the standard <UOM> element) based on the logic in the handler script, and updates the Result List accordingly.

CM Handler Payload Processing User Exit Interceptor Scripts

Mapping data is performed via a Groovy Library Script that is invoked via a user exit during payload processing. The script used in this process is a referred to as a “handler” script.

Handler Script

The “handler” script is responsible for transforming and mapping data elements within measurements and device events.

This script should include the gethandler method that returns an instance of a class that implements the ccom.splwg.d1.domain.sgg.processing.PayloadProcessingCMHandler interface.

To view details of the PayloadProcessingCMHandler interface in the Application Viewer, select the Java Docs Viewer, select the com.splwg.d1.domain.sgg.dg.processing Java package, and select PayloadProcessingCMHandlerfrom the list of interfaces.

The “handler” script should be defined for the “On Result List” Payload Processing User Exit Type in the User Exit Interceptors section on the SGG Payload Processing Configuration extendable lookup. See Creating SGG Payload Processing Extendable Lookup Values for more information.

Configuration Steps

Configuration of Smart Grid Gateway adapters to support mapping of non-standard data involves the following steps:

  1. Create a “handler script” that transforms and maps specific data elements inside the measurement or device event (such as replacing a <externalUOM> element with the standard <UOM> element). See CM Handler Payload Processing User Exit Interceptor Scripts for more information.
  2. Create an SGG Payload Processing Configuration extendable lookup value. The Payload Handler Class Name should reference one of the usage or event “PayloadHandler” classes listed in the Payload Handler Classes and Parameters section. See Creating SGG Payload Processing Extendable Lookup Values for more information about creating these extendable lookup values..
  3. Specify the script for the “On Result List” Payload Processing User Exit Type in the User Exit Interceptors section on the SGG Payload Processing Configuration extendable lookup. See Creating SGG Payload Processing Extendable Lookup Values for more information.
  4. Create other objects and data used with payload processing, including: