Page History
Table of Contents |
---|
...
Introduction
- Users frequently find the situation that jobs in a workflow pass variables to subsequent jobs.
This can easily be achieved by appending a pair of name/value for the variable to a temporary file that is offered by the
JS7_RETURN_VALUES
environment variable like this:Code Block language bash title Example how to pass a variable to subsequent jobs with Unix MY_VAR="some text" echo "my_variable=$MY_VAR" >> $JS7_RETURN_VALUES
Code Block language bash title Example how to pass a variable to subsequent jobs with Windows set MY_VAR=some text echo my_variable=%MY_VAR% >> %JS7_RETURN_VALUES%
Explanation:- A variable
my_variable
is passed as an order variable to subsequent jobs and instructions in a workflow. - The variable can be assigned a constant value or a value from some environment variable as e.g.
MY_VAR
that holds some arbitrary value.
- A variable
- However, there are two limitations about this approach:
- The length of values for environment variables is limited, the precise max. size of environment variables is OS dependent.
- If the value of the variable includes special characters such as carriage return, newline, linefeed then this might break depending on capabilities of environment variables in the OS.
...
Overview
Content Tools