Job Definition XML Files
Overview of Job Definition Creation and Processing
Autobahn Job Definitions are stored as XML files which are generally using the Autobahn Administrator (see section 6).
A job definition file contains certain standard pieces of information (source folder for example) that are common to all jobs plus “StepType” Definition sections for each step in the job.
It is these step definitions that are executed via the Autobahn service.
Job IDs
Autobahn uses a sequential integer job id that starts at 1001. The “next job id” value is held in the <Autobahn DX Installation folder>\temp\next_job_id.xml file and is updated each time a new job is created or copied using the administration tool.
The initial contents of the file are:
<?xml version=“1.0” encoding=“ISO8859-1” ?>
<next_job_id>1001</next_job_id>
Sample Job Definition File
Below is a simple example of a job definition which is designed to continuously (every 30 seconds) monitor a directory (c:\faxes) for new .TIFF files and convert them to searchable PDF and place the resulting files in c:\processed faxes. The step details have been removed for clarity and are covered here.
<autobahnjob>
<jobid>1009</jobid>
<jobname>Monitor incoming faxes and OCR them</jobname>
<adxversion>6.0</adxversion>
<trigger />
<scheduletype>continuous</scheduletype>
<scheduleevery>30</scheduleevery>
<scheduleeveryunits>Seconds</scheduleeveryunits>
<schedulefrom>00:00:00</schedulefrom>
<scheduleto>23:55:00</scheduleto>
<scheduleat>16:00:00</scheduleat>
<stopprocessingonerror>True</stopprocessingonerror>
<sendemailalerts>False</sendemailalerts>
<attachjobreport>False</attachjobreport>
<attachlogfile>False</attachlogfile>
<dontsendnoerror>False</dontsendnoerror>
<dontsendnofiles>False</dontsendnofiles>
<dontsendonsuccess>False</dontsendonsuccess>
<SendEmailAlertsfromaddress />
<SendEmailAlertstoaddress />
<skipprocessedfiles>False</skipprocessedfiles>
<skipmask>%FILENAME.pdf</skipmask>
<SendEmailAlertstitle>%JOBNAME% %JOBSTATUS%!</SendEmailAlertstitle>
<SendEmailAlertsmessage>Job: ‘%JOBNAME%’ Status: ‘%JOBSTATUS%’.<br>
Log: %LOGFILE%.<br>Time: %DATESTAMP% %TIMESTAMP%<br>
Source: <a href=’%JOBSOURCE%’>%JOBSOURCE%</a><br>
Target: <a href=’%JOBTARGET%’>%JOBTARGET%</a><br>
</SendEmailAlertsmessage>
<jobprogresscsv>C:\Aquaforest\Autobahn DX\work\1009\JobProgress.csv</jobprogresscsv>
<jobsteps>1</jobsteps>
<joblogrention />
<joblogmaxsize />
<jobsourcetype>folder</jobsourcetype>
<jobsource>C:\Faxes</jobsource>
<jobtarget>C:\Processed Faxes</jobtarget>
<jobwork>C:\Aquaforest\Autobahn DX\work\1009</jobwork>
<jobarchive>C:\Aquaforest\Autobahn DX\work\Archive\1009</jobarchive>
<inputfilesrename>%FILENAME%%TIMESTAMP%.%EXT%</inputfilesrename>
<joberrors>C:\Aquaforest\Autobahn DX\work\1009\errors</joberrors>
<joblogfile>C:\Aquaforest\Autobahn DX\logs\1009\DATESTAMP%.txt</joblogfile>
<jobCSVlogfile>C:\Aquaforest\Autobahn DX\logs\1009\DATESTAMP%.csv</jobCSVlogfile>
<jobtemp>C:\Aquaforest\Autobahn DX\work\1009\temp</jobtemp>
<JobUseWorkFolder>False</JobUseWorkFolder>
<DeleteEmptyFolders>False</DeleteEmptyFolders>
<SkipErrorFolder>False</SkipErrorFolder>
<inputfileprocessing>leave</inputfileprocessing>
<jobfilterfile>include</jobfilterfile>
<jobfiltertype />
<jobfileorder>alphabetical</jobfileorder>
<jobreturnstructure>False</jobreturnstructure>
<filelength>False</filelength>
<jobinerror>Copy to Error Folder</jobinerror>
<jobstep>
…
</jobstep>
</autobahnjob>
XML Element | Description |
jobid | The job ID number (see 3.2 above). |
jobname | Job Description. Default is “Job %JOBID%” |
adxversion | Autobahn version |
trigger | |
scheduletype |
|
scheduleevery | For continuous schedule type, interval between runs |
scheduleeveryunits | For the continuous schedule type, unit of the interval between runs |
schedulefrom | For continuous, start time for runs |
scheduleto | For onceperday, the time at which to run |
scheduleat | For continuous, end time for runs |
stopprocessingonerror | If true, stop processing if an error occurs |
sendemailalerts | If true, send an email alert |
attachjobreport | Attach the job report to the email |
attachlogfile | Attach the log file to the email |
dontsendnoerror | If no errors, do not send email |
dontsendnofiles | If no files are processed, do not send email |
dontsendonsuccess | On success, do not send email |
SendEmailAlertfromaddress | Address of sender |
SendEmailAlerttoaddress | Address of recipient |
skipprocessedfiles | Skip files |
skipmask | Mask of processed files to skip |
SendEmailAlertstitle | Title of email |
SendEmailAlertsmessage | Email body (HTML elements need to be escaped) |
jobprogresscsv | |
joblogfile | Location of the job log file. By default, the log file is logs/%JOBID%/%TIMESTAMP%.txt |
jobsteps | The number of job steps |
joblogrention | Log file retention period (days) |
joblogmaxsize | Maximum log file size |
jobsourcetype | File, folder or tree |
jobsource | The source file or folder |
jobtarget | The target folder |
Joberrors | Folder for job errors. If not specified files that cannot be processed will be placed in jobwork/errors (this is also the default). |
jobdeleteonsuccess | If “yes”, when a job has successfully completed, all work files (hence input files) are deleted. |
jobwork | The root of the temporary work directories used by the job. The work directories themselves are named work1, work2 etc. |
jobarchive | The path of the folder used as the archive location when inputfileprocessing is set to move or copy to archive. |
inputfilesrename | Name template to rename input files after processing |
joberrors | The path of the folder used as destination when jobinerror is set to move or copy to error folder. |
joblogfile | The log file filepath template, default is to name the log file as the current date. |
jobCSVlogfile | The CSV log file filepath template, default is to name the log file as the current date. |
jobtemp | The temporary folder path. |
JobUseWorkFolder | Use intermediate work folders – required if the job has multiple steps or the input and output folder are the same. |
DeleteEmptyFolders | If true, delete any empty folders in the job source folder |
SkipErrorFolder | |
inputfileprocessing | Action on input files:
|
jobfilterfile | Filter files based on:
|
jobfiltertype | File filter |
jobfilterorder | Ordering of files included (mainly used in conjunction with document count limit options):
|
jobreturnstructure | |
filelength | If true, skip long file names. |
jobinerror | Action when job is in error:
|
jobstep | Contains the definition of a job step. Multiple elements, including multiple steps. See Sample Step Details. |
Job Step
The following is a sample job step. Other step types may have more step details and attribute vales.
<jobstep>
<stepsequence>1</stepsequence>
<steptype>kingfisher</steptype>
<stepdetails>
<operation>kingfisher</operation>
<sourcetype>folder</sourcetype>
<source>C:\Aquaforest\Autobahn DX\work\1010\work1\In</source>
<target>C:\Aquaforest\Autobahn DX\work\1010\work2\In</target>
<inerror>Copy to Error Folder</inerror>
<returnstructure>False</returnstructure>
<errors>C:\Aquaforest\Autobahn DX\work\1010\errors</errors>
<tempfolder>C:\Aquaforest\Autobahn DX\work\1010\temp</tempfolder>
<joboptions />
<advancedflags />
<fileorder>alphabetical</fileorder>
<kfjobid>10002</kfjobid>
<docoptions />
<logfile />
</stepdetails>
<attributevalues>
<attribute>
<attributeid>topdf2</attributeid>
<currentvalue />
</attribute>
<attribute>
<attributeid>topdf1</attributeid>
<currentvalue>10002</currentvalue>
</attribute>
</attributevalues>
</jobstep>
| – | – | | XML Element | Description | | stepsequence | The number of the step in the sequence. The steps will be processed in stepsequence order (ascending). | | steptype | Identifier of the step type. This will match the files (without the ordering number) found in <installation folder>\Autobahn DX\steptype | | stepdetails | Details of the step that are passed to the step processor. See below. | | attributevalues | Elements that are displayed in the UI. See below. |
A Job step comprises of four elements.
Step Details
The details of the step are provided here and provide sufficient information for the Autobahn service to execute the step, in conjunction with the information in the StepType definitions. Files are moved from the jobsource directory into the working directory specified by <sourcefiles> and the result files are placed in the <target> directory. Upon completion of all the steps, the service will move the files from the final work directory to the <jobtarget> directory.
The Step Details will vary by step type.
| – | – | | XML Element | Description | | Operation | The operation (e.g. split). This is defined in the step definition file for the steptype. | | Sourcetype | Folder, file or tree. | | Source | Source file or folder. | | Target | Target folder. | | inerror | Action to be undertaken in the event of an error | | returnstructure | Retain file structure when copying/moving to error folder (based on inerror setting above). | | Errors | Files that cannot be processed are placed in this directory. Inherited from the Job definition. | | tempfolder | The temporary folder to use for this step (defaults to job temp folder). | | Joboptions | These are steptype-specific parameters that are derived from the options selected in the Job Designer. | | advanced Flags | Additional advanced steptype-specific parameters that can be entered manually only. | | fileorder | Order of file selection. | | kfjobid | Kingfisher job id. This is linked to the attribute topdf2 (see below). | | Docoptions | PDF file open options derived from the options selected in the Job Designer. | | Logfile | If specified, the output will be logged to a file with this name in %PDFJUNCTIONDIR%\logs or %TIFFJUNCTIONDIR%\logs |
Attribute Values
The attribute values element contains the attributes that are displayed and edited in the UI.
Each attribute element comprises paired attributeid and currentvalue elements.
The attributeid can be used to link to the matching stepdetail by examining the Step Type file.