Custom Payload Processing Overview

This section provides an overview of the payload processing logic when converting incoming data into the native format.

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. This class handles the interaction with the User Exit Interceptor scripts.
  3. The upload process invokes the “On Get Parser” User Exit Interceptor. This executes a “parser” Groovy Library Script that returns an instance of a class that implements the com.splwg.d1.domain.sgg.dg.processing.PayloadParser interface.

    This “payload parser” 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 invokes the “On Get Transformer” User Exit Interceptor. This executes a “transformer” Groovy Library Script that returns an instance of a class that implements com.splwg.d1.domain.sgg.dg.processing.PayloadTransformer interface.

    This “payload transformer” is initialized with a string representing the origin of the payload and business object instance of SGG Payload Processing Configuration extendable lookup.

  5. The upload process invokes the payload parser to parse data from the incoming document into the “Plain XML” format. See Payload Parser Steps, below.

  6. The upload process invokes the payload transformer, passing the Plain XML data and a Result List parent node.

  7. The payload transformer 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. See Payload Transformer Steps, below.

  8. The upload process creates business object instances for all child nodes of the Result List.

  9. The process steps (5-9) are repeated until the payload parser returns NULL on step 5 (when there are no further records to process).

Payload Parser Steps

  1. The payload parser reads an input stream until it hits the logical end of portion of data (each usage or event record), which could be transformed into Plain XML.

  2. The payload parser parses the data and converts into the Plain XML format.

  3. The process is performed for each call from the upload process.

Payload Transformer Steps

  1. The payload transformer reads the given Plain XML.

  2. The payload transformer generates a set of XML nodes representing Initial Measurements (IMDs) or Device Events. Names for nodes are taken from the provided SGG Payload Processing Configuration.

  3. The payload transformer adds the generated nodes to the given Result List node.