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
- The file upload process program starts reading the file.
- The upload process creates an instance of the Payload Handler class. This class handles the interaction with the User Exit Interceptor scripts.
- 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.
- 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.
-
The upload process invokes the payload parser to parse data from the incoming document into the “Plain XML” format. See Payload Parser Steps, below.
-
The upload process invokes the payload transformer, passing the Plain XML data and a Result List parent node.
-
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.
-
The upload process creates business object instances for all child nodes of the Result List.
-
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
-
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.
-
The payload parser parses the data and converts into the Plain XML format.
-
The process is performed for each call from the upload process.
Payload Transformer Steps
-
The payload transformer reads the given Plain XML.
-
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.
-
The payload transformer adds the generated nodes to the given Result List node.