jobdefs

Top  Previous  Next

The jobdefs object is used by the Image Manager to both configure and run jobs.

 

Methods

exportjobs$(jobnames$) returns the name of a work file, whose contents are built from the jobs named in the linefeed delimited list of image manager job names supplied.  The work file is a structured data file (treat it as binary rather than text) containing both the job definitions and well as script library definitions used by the jobs, including filters, validations, and lookups.  This file can be imported by another UnForm installation, in order to deploy jobs between sites.

getparam$(jobname$,name$) returns the value of the named parameter in the specified job definition.  It returns null if the job name doesn't exist or the parameter name doesn't exist.

importjobs(jobsfile$[,log$]) imports jobs and script library definitions from the supplied jobs file.  This file must have been created by the exportjobs$() method.  Before importing the records, a dated backup zip file is generated in im/backups containing the jobs master file and the im/* script library ini files.  If supplied, log$ will contain a plain text log of actions performed.

logmsg(jobid$,message$) updates the log for the running job.  The jobid$ value is maintained by the job execution code and can be used 'as is' when your code needs to add logging data.  It is also available in the doc object automatically instantiated in filter, validation, and lookups objects.

 

Note this differs from the system-level log() function, which writes lines to the UnForm server log file.

paramexists(jobname$,name$) returns true (1) if the named parameter exists in the specified job definition, false (0) otherwise.

searchjobs$(text$) returns a linefeed delimited list of job names, of jobs that contain the text supplied.  If text$ starts with ~, a regular expression match is performed.  The entire job definition is searched.