Passing variables between jobs
In many scenarios, the job output or a job property of the first job in a job stream can be the input for the execution of the successive jobs in the same job stream or in a different job stream.
In the following scenario, you have JobA and JobB in the same job stream instance and JobA is a predecessor of JobB. JobA passes some variables values to JobB at execution time.
You can
pass the following variables from JobA to JobB:
- JobA exports some properties and JobB references these properties in its definition as variables in a predefined format. At execution time, the JobB variables are automatically resolved. The job properties that you can export depend on the job type you are defining. See Passing job properties from one job to another in the same job stream instance.
- JobA exports its standard output value and JobB references this standard output as a variable. At execution time the JobB variable is automatically resolved. See Passing job standard output from one job to another in the same job stream instance.
- Only for executable jobs. JobA exports its standard output value and the JobB references this standard output as its standard input value. See Passing job standard output from one job to another as standard input in the same job stream instance.
- Only for native and executable jobs. JobA sets some variable values by using the jobprop utility on UNIX operating systems and jobprop.exe utility on Windows operating systems that are installed on dynamic agents. JobB references these variable values in its definition. At execution time, the JobB variables are automatically resolved. See Passing variables set by using jobprop in one job to another in the same job stream instance.
In a different scenario, JobA exports variables in a variable table. The variable table makes the exported variables available to JobB, where JobB is any successor job, in the same job stream or in a different job stream. See Passing variables from one job to another in the same job stream or in a different job stream by using variable tables.
Note: The USERJOBS job
stream that is created by HCL Workload Automation processes,
does not support the passing of variables among jobs that belong to
it.