Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • A job is the basic unit what to execute with an Agent.
  • Job implementations come with the following flavors:
    • Shell Jobs are executed with the operating system shell, e.g. the Windows Shell or one of the Unix Shells such as /bin/sh, /bin/bash etc.
      • Shell jobs include to call any shell commands, scripts and executable files.
      • Such jobs behave similarly to individual commands being executed in the command line of the operating system.
      • Shell jobs include to use scripting languages such as Perl, Ruby, Python, PowerShell etc. for which an interpreter is installed with the OS that can be executed from the command line.
      • Consider that jobs executed by an Agent cannot successfully request interaction from a console or from a user. If the application, command, script or binary file that is executed tries to bring up a popup window for user interaction then this will fail as in scheduling mode there is no console window to display messages and to request a user to confirm a popup window.
    • JVM Jobs are implemented in a number of supported languages that can be operated for a Java Virtual Machine and for which the Agent exposes JS7 - Order Variables and job node arguments. Job implementation languages include
      • Java: such jobs are executed in the JVM provided by the Agent.
      • JavaScript, Ruby, Python etc.: such jobs require use of a GraalVM® Java Virtual Machine that provides the compiler for the respective scripting language.

...

  • Node properties include the list of default arguments that are available from the respective job node:



  • The use case for node arguments includes to use the same job for a number of times in a given workflow with different parameter sets.
    • Assume that the job requires the same parameter names to be used.
    • However, for each occurrence of the job in a workflow different parameter values should be used.
  • In this situation node arguments can be introduced that specify variables with the same name but with different values for each occurrence of a job in the workflow.
    • Names of node arguments should not interfere with order variables as otherwise the node argument values will be overwritten by order variable values.
    • For shell jobs node arguments have to be mapped to environment variables similarly to order variables. 
    • For JVM jobs node arguments are available from Java objects exposed to the job implementation.

Error Handling

By design the Job Instruction provides no capabilities to handle job errors. The Job Instruction is limited to determine if the job's return code signals success or error.

Instead, any error handling is performed by workflow instructions:

  • A job can be added to a JS7 - Try / Catch Instruction block to execute follow-up jobs from a Catch block in case of job failure.
  • A job can be added to a JS7 - Retry Instruction block to retry execution of one or more jobs in case that a specific job fails.
  • A job can be added to a JS7 - If Instruction to check the job's return code or return values and to decide about further processing such as failing or finishing the underlying order or continuing with a different set of jobs in the workflow. This particularly applies to a situation when a job terminates with a non-zero return code that is not considered an error but e.g. an informational warning or in a situation when return codes are used to control workflow execution, e.g. indicating by specific return codes that successor jobs should be skipped. The If Instruction is the perfect means to handle this situation.