Skip to content
This repository was archived by the owner on Dec 9, 2019. It is now read-only.

Latest commit

 

History

History
36 lines (22 loc) · 2.29 KB

File metadata and controls

36 lines (22 loc) · 2.29 KB

RailroadPM.org Participant Kit - Admin Automation Details

This Admin Automation option is the recommended way of performing EDI with the RailroadPM system. It mimics the steps that a human user would take to login to the RailroadPM data administration (aka "extranet") website and enter the weekly data. This has the benefit of consistency in the way that the data is accepted and verified by the RailroadPM system.

To use the Admin Automation option for EDI, here are the steps you would follow manually from a command prompt. You can automate the appropriate weekly pieces of this procedure (e.g., copying your weekly data file to the appropriate folder and running the upload script) to make this an unattended process.

  1. Clone or download this GitHub repo.

  2. Change your current working directory to this AdminAutomationExample folder:

    cd AdminAutomationExample
  3. Install Node.js (LTS version 8.x) if it isn't already installed.

  4. Run the following command to install the required Node.js NPM packages:

    npm install
  5. Edit config.json, replacing the placeholder values with your RailroadPM participant email and password. Save those changes.

  6. Replace NewWeek.toml (which is supplied solely as a placeholder here) with the actual weekly data you wish to upload. For each current participating railroad, an example .toml file has been supplied in the sample-data-files folder. Your weekly file must be in precisely the format you see there, with changes allowed only to the numeric values and to the Title string. The Title must be the weekly reporting period end date (a Friday) in the format: 'YYYYMMDD'.

  7. Finally, with your participant credentials configured, and your properly formatted NewWeek.toml file in place, execute the following command:

    npm run upload
  8. You may be asked to allow the process to send traffic through your firewall. If so, allow access.

  9. Note the exit code of the process. A non-zero exit code means that an error occurred and the data likely was not uploaded successfully. An exit code of zero indicates success. Sample error and success outputs are provided in the sample-output folder.