JetTrac XML2CSV

Introduction:

Used to provide “loose” integration with other systems that can ingest a CSV containing metadata and optionally a fully qualified PDF filename of the document just created in the JetTrac job.

Technical Support:

If you need assistance in installing and configuring JetTrac XML2CSV™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at support@protechinc.com. Please note that the JetTrac XML2CSV™ license fee does not cover configuration services and technical support so there may be an additional charge. Please ensure you read these instructions carefully before calling for technical support.

How to run JetTracXML2CSV:

Extract data from XML file and store in a CSV file. Through a JetTrac JobController Job or batch file.
To run JTXML2CSV you will need these files in the same folder:

  • JTXML2CSV.exe
  • ExitHandler.dll

Executable files and dll files should not be edited for any reason.

Default Functionality:

Read specific fields from an XML file and create a CSV file in a specified format. 

Job Step Configuration Window in JobConfig for JetTrac XML2CSV:

When setting up a job step using JTXML2CSV in JobConfig the only lines of the config you need to worry about are the first two and the last two, the Config file, the Archive PDF, the Input XML, and the Output CSV. If left as an asterisk * the input will be whatever file is in the data folder that triggered the job running. This works well if it’s the first step but if the input is also the output of a previous job step you would need to specify the fully qualified path of the input XML to convert to a CSV . All other fields should be filled with the fully qualified path to the intended file. Eg: C:\JetTrac\…\input.pdf
In JobConfig, file paths entered should not be in quotes.

As with all modules, there is a dropdown to select whether or not the job should stop completely if this step fails. If you select Yes, any error will terminate the job process and write to the log file what happened, if no, then the job will try to continue anyways. However if any steps further down the line rely on the output of a job set to not stop on error, they may not work properly.

For more specifics go to the JetTrac Field ServiceJobConfig page.

JetTrac XML2CSV Command Line:

“C:\JTXML2CSV\JTXML2CSV.exe” “JTXML2CSV_Input.xml” “JTXML2CSV_Output.csv” “JTXML2CSV_config.ini” “JTXML2CSV.log” “JTXML2CSV_PDF.pdf”

The command line begins with the file path to the module’s executable file, the path to the input XML file, the output CSV file, the config file and the log file. Then after the log file, @PreambleName is the variable containing the PDF file from which the XML file was obtained. Each part of the command line is the fully qualified path to the file, in quotes, separated by a space (it doesn’t matter how many) 

Config.ini sample:

Fields=WorkOrder_Num,Building_ID,_kf_Building_ID,_kf_EventID,TechNotes,IsForm,$PDFName
ParentNode=Event

On line 1 is a list of all the fields desired to be in the CSV file, separated by a comma.

On line 2 is another key value for ParentNode. This second key value is optional (can be left blank or not exist in the config.ini file). If this key value exists, only fields found within the ParentNode specified that also match the field names in the first key value will be output in the CSV file.