OpenWGA 7.11 - TMLScript reference


Object:

JobContext

Description This object serves job and scheduler specific information and functions inside an OpenWGA job, like logging to the job log, retrieving job options and the like.

Additionally it is possible for tasks that run in the same job to communicate via custom job options. A task may write a value that a subsequent task can read and react on.
Retrieval Object "jobContext" in scheduler jobs
Allowed in script types
  • TMLScript tasks in jobs
    portletevent
Properties and methods
Name Purpose
breakIfCancelled() Queries if the job has been cancelled and, if so, cancels it via error
cancelable Determines if this job is cancelable
cancelJob() Cancel the current job
cancelled Returns if this job has been cancelled by an administrator
dbUpdated(db) Inform the job runner about db-updates
log Provides a log object for writing to the job log
getOption(name [, defaultValue]) Reads an option from task or job
options Provides the options defined on the job
customOptions Provides access to custom job options
previousResult Returns the result of a previous task
result Holds some custom result value of the task
setEndMessage(msg) Sets the end message