HCL Workload Automation, Version 9.4

Using variables in job definitions

This section explains how to use variables to add flexibility to the job definitions.

There are two types of variables in a job definition:

Job variables
There are three types of job variables: String, Double, Integer. You can define job variables in your job definition that are resolved or overwritten at job submission time. This enables the job definition to be used for different situations by specifying different values for the variable at submission time. You define variables in the variable element, but you can refer to the variable from several other elements.
You define variables and assign them values from the Overview page on the Job Brokering Definition Console. Job variables are referenced in the job definition in the format ${variable_name}. For example, to use a variable to set the minimum amount of physical memory required for a job to 512 MB, do the following:
  1. In the Variables pane of the Overview page, add the string variable memory and assign it a value of 512.
  2. On the Hardware Requirements tab of the Resources page, select Range value for Physical memory and set the Minimum value to ${memory}.

When jobs are submitted, using Dynamic Workload Console, HCL Workload Automation Task field, or the HCL Workload Automation CLI, default values for variables defined in the job definition can be overridden and new variables can be added.

Environment variables
Environment variables are set in the run time environment for the HCL Workload Automation job definition. Environment variables can be used to change the run time environment for the job on the assigned resource. This enables you to change only the values of the environment variables when you change the resources for the job definition. Environment variables are referenced in the job definition in the format $variable_name where variable_name is the name of the environment variable.

Environment variable values cannot be set or overwritten when the job is submitted.