OpenWGA 7.0 - TMLScript reference

JobContext
Method :

getOption(name [, defaultValue])

On object JobContext
Usage Reads an option from task or job
Description This method looks up all places where options are defined for the current job context, which is in the following order:

  • Custom options (set by other tasks)
  • Configured options of the task
  • Configured options of the job
If an option is found on any level it is returned. If not it returns the optional default value given or null.
Parameters name (String):
The name of the option to read

defaultValue (Object, optional):
A value that should be returned if the option is not available. If this is not specified the method returns null in that case.
Return value The option value, default value or null
Allowed in script types
  • TMLScript tasks in jobs