Versions Compared

Key

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

...

  • Jobs can be assigned variables from a number of sources.
    • Shell Jobs:
      • Job Resources holding constant values
      • Job Environment Variables populated e.g. from constant values and order variables
    • JVM Jobs: 
      • Initialization Arguments populated from constant values
      • Job Arguments populated e.g. from order variables
  • The article explains the sources of variables and the syntax for assignment.

Shell Jobs

Assignment of Environment Variables from Job Resources

Job Resources can be defined to hold a number of environment variables for shell jobs, e.g. in order to forward environment variables for paths and locations to scripts.

  • Environment variables from Job Resources are automatically available for Shell Jobs.
  • Environment variables are limited in scope to the current job. Therefore modifications of a job script to an environment variable by a job script are not effective beyond the scope of current job execution of the job.
  • Environment variables use the data type "string".

Assignment of Job Environment Variables

Shell jobs can define their individual set of environment variables. 

  • The values of environment variables can be specified from
  • Environment variables are limited in scope to the current job. Therefore modifications of a job script to an environment variable by a job script are not effective beyond the scope of current job execution of the job.
  • Environment variables use the data type "string". Should assigned variables use a different data type then the value is converted to string.

JVM Jobs

...

Assignment of Job Arguments

Job Arguments are used by JVM Jobs on startup of the Agent.

  • The purpose of Job Arguments is to parameterize optional startup code of a job that should be run on initialization of the job and before the job will be executed for orders later on.
  • Constant values only can be assigned.

Assignment of Arguments

Such arguments are used by JVM Jobs when processing orders. 

  • The purpose of Arguments is to parameterize processing of an order.
  • Constant values can be assigned and Order Variables.

Syntax Examples

The following assignment types are available:

...

Find a number of syntax examples for assigning a variable an expression:.

Examples for Constant Values

...

  • Use with single quotes

    Inputvar = 'some value'
    Outputsome value



  • Use with double quotes

    Inputvar = "some value"
    Outputsome value



  • Use with single quoted values

    Inputvar = 'some \'quoted\' value'
    Outputsome 'quoted' value



  • Use with double quoted values

    Inputvar = "some \"quoted\" value"
    Outputsome "quoted" value



  • Use with double quoted and single quoted values

    Inputvar = "some 'quoted' value"
    Outputsome 'quoted' value



  • Use with $ character from single quoted values

    Inputvar = 'some $dollar value'
    Outputsome $dollar value



  • Use with $ character from double quoted values

    Inputvar = "some \$dollar value"
    Outputsome $dollar value

...

  • Use without quotes
    Assume var2 to hold the value: some value

    Inputvar = $var2
    Outputsome value



  • Use with double quotes
    Assume var2 to hold the value: some value

    Inputvar = "$var2"
    Outputsome value



  • Use with constant values from double quoted values
    Assume var2 to hold the value: second value

    Inputvar = "first value, $var2"
    Outputfirst value, second value



  • Use with string concatenation from double quoted values
    Assume var2 to hold the value: second value

    Inputvar = "${var2}first value"
    Outputsecond valuefirst value



  • Use with constant values and single quoted values
    Assume var2 to hold the value: second value

    Inputvar = "first, '$var2'"
    Outputfirst, 'second value'