1.0.1 • Published 4 years ago

xml-updater v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

XML Update Process for Renewal Notices

in the state of Massachusetts (only)

Process

  1. Pick up the xml files in located in the F:/Groups/Auto Jobs/Exports/Varidoc/Renewal Notices/New/Pending directory and process the file with the requirements listed below.

  2. Once the file has been processed place the processed file in the F:/Groups/Auto Jobs/Exports/Varidoc/Renewal Notices/New directory, where it will be picked up and sent over to the vender via FTP.

  3. Place a copy of the processed file in the F:/Groups/Auto Jobs/Exports/Varidoc/Renewal Notices directory for audit records.

  4. Move the original file out of pending to F:/Groups/Auto Jobs/Exports/Varidoc/Renewal Notices/Original Copies.

  5. Repeat steps 1 - 4 everytime there are new files. For this reason the application is triggered by events and watches the Pending directory for additions.

To run

From the command line run the command yarn dev to start the application in development

To start in production yarn start or node src/index.js

Requirements

  • All of the following changes will only be applied where the ServiceState === 'MA'

  • Add NewRateInCents field to each StandardizedFile

    • NewRateInCents data can be gathered from the Rate and converted to cents (multiply by 100) and format to two decimal places.
  • Add CurrentRateInCents field to each StandardizedFile

    • The Current Rate for individual customers must be queried for in the RatePlanContract table under the 'Cntrt_Rate' and 'Cntrt_CustNo' columns and the 'cm_custno' column CustomerMaster table and joined by the customer number in the ClearviewPrd database. Note: You can sort out states that are not 'MA'

    • Once you have this list, you can collect the current rates based on the CustNo

  • Add ContractEndMonth and ContractEndYear in each StandardizedFile

    • Both of these fields can be gathered from ContractEndDate in the each StandardizedFile

Other Notes from the vender:

  1. Xml files must contain xml declaration
  2. Each open and closing tag must be on the same line (except tags containing other tags)
  3. xml needs to be formated
  4. Brodnax does not accept duplicate file names

TODO:

  • Connect Pino logging to the company's SQL Server Reporting Services
  • Move application to production environment (ie. place on server)

    • Check that drives of file locations are the same
  • Create automated removal of processed files from the pending directory