Meter Export Run
The export process uses an XML template to create a data file listing the meters for which readings are to be recorded. After readings are added, the meters can be re-imported in a meter import run.
Before exporting meters, you must first create one or more export schedules in Create Cycle Reading Export Schedule. See the online help or the Meter Management User Guide for instructions.
This is the basic export process:
- Get reading export schedules to be run.
- For each schedule, add a record to the READINGEXPORTACTIVITY table, and a
READINGEXPORTROUTEDETAIL record for each route.
These records are used to help keep track of the export process. See descriptions below for details.
- Get all meters in the routes to be exported.
This step uses a SQL query to get all address positions in each route from the RTADDR table, then select the meters installed at those positions.
- Check meters for each exception type defined in Cycle Reading Export Setup.
- Add a record for each meter to the READINGEXPORTMETERDETAIL table, indicating whether it is an exception. Only meters without exceptions will be exported.
- Get the path of the data output file and the template file from the export
schedule.
The export file path is stored in the EXPORTDIRPATH column of the READINGEXPORTSCHEDULE table. The template is specified in the EXPORTTEMPLATEFILE column, but note that this column doesn’t store the actual file path. Instead, it refers to a template defined in the Meter Management configuration in the Configuration Editor.
- Get XSLT out of the template.
- Create the meter export file or files.
Depending on your cycle reading export setup, the process will create a single data file for all exported routes, or a separate file for each route.
Setup
This table describes the Configuration Editor settings that affect this task:
Configuration and path | Comments |
---|---|
MeterManagement/ ExportTemplate | Defines the available export templates. |
This table describes the Infor Public Sector setup forms that are used to configure this task:
Setup form | Comments |
---|---|
Keyword Manager | Defines the keywords that the export templates use to identify values in the database. |
Cycle Reading Export Setup | Sets default options for the meter export process, such as the export path, the template to use, and the exceptions to consider. Note that the defaults can be overridden for an individual export schedule. |
This table lists the database tables that store setup information for this task:
Table | Comments |
---|---|
METERMANAGEMENT. READINGEXPORTSETUP | Stores meter export setup data. |
Invocation
To schedule a meter export run, you can use the Batch Manager, the Billing Calendar, or Create Cycle Reading Export Schedule.
This table describes each parameter for this task:
Form | Console | Description |
---|---|---|
Reading Cycle | MeterReadingCycle (string) | Cycle for which you’re exporting meters. |
ReadingExportScheduleKey (int) | Can be used in the console application to start the export process for a specified schedule. |
Monitoring
Several tables in the database are used to monitor the export process, especially READINGEXPORTACTIVITY, READINGEXPORTROUTEDETAIL, and READINGEXPORTMETERDETAIL.
In addition, the export process adds a series of log entries to NGEvents in the Infor Public Sector Log directory. (Note that logging must be turned on in the Logging configuration.) If the Meter Export run is successful, you should see a series of messages similar to these in NGEvents:
- InitializeMeterExportProcess Started
- ReadingExportActivity record Added
- ReadingExportRouteDetails record added successfully for Route – [route ID] With Key of – [route detail key]
- InitializeMeterExportProcess is Success
- GetAllMetersInSelectedRoutes is Started
- GetAllMetersInSelectedRoutes is success
- MarkMetersForUserDefinedExceptions started
- MarkMetersForUserDefinedExceptions completed with success
- SeparateExceptionMetersFromExportableMeters started
- SeparateExceptionMetersFromExportableMeters completed with success
- UpdateReadingExportActivity started for updating the total of Exportable and Exception meters
- Successfully updated ReadingExportActivity for total number of meters
- UpdateReadingExportRouteDetail started for updating each Route with total number of Exportable and Exception meters
- Updated Reading Export Route Detail for Route – [route key]
- Successfully Updated All routes for total number of participating Meters
- AddReadingExportMeters Meters to ReadingExportMeterDetails started for inserting the Exportable Meters to ReadingExportMeterDetail Table
- Successfully Added exportable meters to ReadingExportMeterDetail Table
- InitiateExport started
- InitializeDataOutput Started for single file
Or:
- InitializeDataOutput Started for multiple file
- Total Number of Exportable meters found is – [#]
- Updating ReadingExportRouteDetails for Route [route key] for status of PreparingForDataOutput.
- Created File for Activity with filename of [file name]
- Updating Status in Activity for status to Processed
- Updating Status in Routedetail for status to Processed for Route [route key] with filename of [file name]
- Termination Started.
Data output
The primary data output for a meter export run is the data file or files, which can be found in the specified export directory.
This table lists the database tables in which this task adds or updates records:
Table | Comments |
---|---|
ASSETMANAGEMENT_WATER. COMPWMTR | Updates the LASTREADINGEXSCHDKEY column and sets the OUTFORACTIVITYFLAG to Y for each exported meter. |
METERMANAGEMENT. READINGEXPORTACTIVITY | Each export run creates an export activity record, which is used to track the status and progress of the export. The current status is indicated by the STATUS column, using these codes: 0 (None), 1 (NotProcessed), 2 (Processing), 3 (PreparingForDataOutput), 4 (ProcessingForDataOutput), 5 (ProcessedWithDataOutputExceptions), 6 (Processed), 7 (FileCouldNotBeCreated), 8 (Error), 9 (ErrorPreparingForDataOutput), 10 (ErrorProcessingForDataOutput) |
METERMANAGEMENT. READINGEXPORTMETERDETAIL | Stores a record for each meter exported in the run. |
METERMANAGEMENT. READINGEXPORTROUTE | A reading export route record is added for each route associated with the export schedule. EXPORTOUTSTANDFLAG |
METERMANAGEMENT. READINGEXPORTROUTEDETAIL | Keeps track of each route within the export process. The STATUS column uses the same codes as in the READINGEXPORTACTIVITY table. |
METERMANAGEMENT. READINGEXPORTSCHEDULE | If the schedule is rerun, the RERUNNUMBER column will be updated. |
METERMANAGEMENT. READINGEXPORTSETUP | The EXPORTRUNNUMBER column is a counter that keeps track of the number of exports that have been run. |
METERMANAGEMENT.ROUTE | Sets the OUTFORACT column to Y for each exported route. |
This table lists the Infor Public Sector forms that you can use to review the results of this task:
Form | Comments |
---|---|
Lookup Cycle Reading Export/Import Schedule | Used to search for and review export schedules. |
Cycle Reading Export Schedule InfoViewer | Shows information on a selected schedule, and can also be used to rerun the export. |