Job Definition XML Files

Overview of Job Definition Creation and Processing

Diagram Description automatically generated

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 ElementDescription
jobidThe job ID number (see 3.2 above).
jobnameJob Description. Default is “Job %JOBID%”
adxversionAutobahn version
trigger
scheduletype
  • Ad-hoc

  • Continuous

  • Onceperday

scheduleeveryFor continuous schedule type, interval between runs
scheduleeveryunitsFor the continuous schedule type, unit of the interval between runs
schedulefromFor continuous, start time for runs
scheduletoFor onceperday, the time at which to run
scheduleatFor continuous, end time for runs
stopprocessingonerrorIf true, stop processing if an error occurs
sendemailalertsIf true, send an email alert
attachjobreportAttach the job report to the email
attachlogfileAttach the log file to the email
dontsendnoerrorIf no errors, do not send email
dontsendnofilesIf no files are processed, do not send email
dontsendonsuccessOn success, do not send email
SendEmailAlertfromaddressAddress of sender
SendEmailAlerttoaddressAddress of recipient
skipprocessedfilesSkip files
skipmaskMask of processed files to skip
SendEmailAlertstitleTitle of email
SendEmailAlertsmessageEmail body (HTML elements need to be escaped)
jobprogresscsv
joblogfileLocation of the job log file. By default, the log file is logs/%JOBID%/%TIMESTAMP%.txt
jobstepsThe number of job steps
joblogrentionLog file retention period (days)
joblogmaxsizeMaximum log file size
jobsourcetypeFile, folder or tree
jobsourceThe source file or folder
jobtargetThe target folder
JoberrorsFolder for job errors. If not specified files that cannot be processed will be placed in jobwork/errors (this is also the default).
jobdeleteonsuccessIf “yes”, when a job has successfully completed, all work files (hence input files) are deleted.
jobworkThe root of the temporary work directories used by the job. The work directories themselves are named work1, work2 etc.
jobarchiveThe path of the folder used as the archive location when inputfileprocessing is set to move or copy to archive.
inputfilesrenameName template to rename input files after processing
joberrorsThe path of the folder used as destination when jobinerror is set to move or copy to error folder.
joblogfileThe log file filepath template, default is to name the log file as the current date.
jobCSVlogfileThe CSV log file filepath template, default is to name the log file as the current date.
jobtempThe temporary folder path.
JobUseWorkFolderUse intermediate work folders – required if the job has multiple steps or the input and output folder are the same.
DeleteEmptyFoldersIf true, delete any empty folders in the job source folder
SkipErrorFolder
inputfileprocessing

Action on input files:

  • Copy to Archive after processing

  • Move to Archive after processing

  • Leave input files after processing

  • Move input files to Target folder after processing

  • Delete input files

jobfilterfile

Filter files based on:

  • Include files matching

  • Exclude files matching

  • Include with document count limit

  • Include unprocessed PDFs only

  • Include unprocessed PDFs only with document count limit

jobfiltertypeFile filter
jobfilterorder

Ordering of files included (mainly used in conjunction with document count limit options):

  • Alphabetical

  • Created date/UTC date ascending or descending

  • Modified date/UTC date ascending or descending

jobreturnstructure
filelengthIf true, skip long file names.
jobinerror

Action when job is in error:

  • Move to error

  • Copy to error

  • Take no action

jobstepContains 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.