Versions Compared


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


  • Order variables are declared by specifying a name and data type.
    • If no default value is added then the order variable is mandatory, i.e. all orders have an order has to specify a value for the variable.
    • If a default value is added then
      • the order variable is optional, i.e. orders can specify a value and otherwise the default value will be used.
      • the final data type can be added used that prevents the variable from being modified later on in the workflowafter the point in time of submission of an order.
    • Default values accept constant values and JS7 - Expressions for Variables.
  • Any number of order variables can be declared.


  • to populate environment variables that are used in job scriptsshell jobs,
  • to populate node arguments,
  • to be evaluated by an expression in a JS7 - If Instruction.


  • The property editor suggests using the names of order variables for environment variables.
    • Environment variable names are automatically converted to uppercase letterscreated with the given spelling. In Unix environment variables are case-sensitive, in Windows they are case-insensitive.
  • Similarly the values of order variables are suggested with a $ prefixing the name of the variable.
    • Note that only names of existing order variables can be used as the value for an environment variable.
  • In addition, expressions can be used for order variables - for details see:

Using Environment Variables


in Job Scripts

Environment variables can be used with in job scripts according to the syntax of the operating system that the job is executed for:

  • for Windows use: %VAR_STRING%
  • For Unix use
    • ${VAR_STRING}

Image Modified

Using Node Arguments


  • The job script can append a variable name-key/value pair to a temporary file indicated with the $JS7JS7_RETURN_VALUES environment variable.
  • The JS7 Agent will pick up the temporary file after execution of the shell job and will use the file's entries to create new order variables for subsequent instructions and jobs in the workflow.
  • This mechanism is used to create new order variables from Shell Jobs. It cannot be used to modify existing order variables . Shell jobs should always create new order variables to pass values to subsequent instructions and declared with a workflow. Order variables that are not declared but created on-the-fly by shell jobs can be updated by subsequent shell jobs.

Code Block
titleUnix example to dynamically create an order variable
SOME_VARIABLE="some value"
Code Block
titleWindows example to dynamically create an order variable
set SOME_VARIABLE=some value


  • Both examples assign a value to an environment variable SOME_VARIABLE that is local to the job.
  • The namekey/value pair myVar=.... is appended to the temporary file indicated by the JS7_RETURN_VALUES environment variable.
    • This assignment makes use of the value stored in the SOME_VARIABLE environment variable.
    • This assignment could also use a constant value instead of using SOME_VARIABLE.


  • $js7JobName
    • The name of the current job for which an order is executed.
  • $js7JobExecutionCount
    • A counter for the number of times that the same job node is executed within a workflow, e.g. if used with the JS7 - Retry Instruction.
  • $js7EpochMilli$epochMilli
    • The number of milliseconds since January 1st 1970 UTC.
  • $returnCode
    • The numeric exit code of the current job for which an order is executed.