The following document will go through the functionality found within JetTrac DataPrep. The purpose of this module is to replace a string of characters in an XML file, with a different string of characters.
If you need assistance in installing and configuring JetTrac DataPrep™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at firstname.lastname@example.org. Please note that the JetTrac DataPrep™ 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.
To run the program, you will need to have the following file:
JTDataPrep.jar is required for the program to run and should never be edited.
JetTrac DataPrep takes an input configuration .ini file and an input XML file. The module will then look for strings of characters in the XML file and replace them with whatever you have specified then output a modified XML file. This functions the same as Find and Replace functionality found in most word processing applications.
When setting up a job step using JTDataPrep in JobConfig the only lines of the config you need to worry about are the first and the last two, the Config file, the Input XML and Output XML. 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 XML file you want to edit. Eg: C:\JetTrac\…\input.xml
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 BYODJobConfig page.
The command line to run JetTrac DataPrep contains the location of the .jar file, the input XML file, the location to save the modified output XML file, the location of a configuration .ini file, and the log file. The following is an example of the command line used to run this module:
java –jar C:\JTDataPrep.jar “C:\Input.xml” “C:\Output.xml” “C:\Config.ini” “C:\JTDataPrep.log”
Each part of the line is divided by spaces (the amount doesn’t matter), and contains the fully qualified file path to the file you are referencing surrounded by quotes. In the example all of the file paths reference the root of C:\, however, it is likely that none of these files will be located in the root of C:\ for your system, so this is simply demonstrating that the full file path is required.
The configuration file for this module can contain any number of lines with each line containing a different string replacement. The following is an example of a configuration file for JetTrac DataPrep:
String value for a field|New string value for a field
Remove This String|
This configuration .ini file contains three strings that it will look through the input XML and replace. Any time the module finds any of the strings before the pipe “|”, it will be replaced with the string after the pipe. You will notice that the last string replacement is left blank after the pipe. This last line will replace the string before the pipe with the string after effectively removing it altogether.
Please note that the string replacement will replace ALL instances of the string that you specify with exactly what you enter after the pipe. This means that the more specific you are, the less likely you are to replace something you didn’t mean to.
Also note that when the module searches for a string, it searches for exactly those characters. If the string within the input XML does not match the string exactly, it will not be replaced.