When you
create flows, you define flow input variables: the variables that are required to be entered for the
flow to run. These flow input variables automatically become environment variables that can be used
by work items in the flow.
About this task
For example, if you define MYVAR as a flow input variable, within the job command, you can use
the variable:
echo do #{MYVAR}
In any script within your flow, you can also use the environment variable
$MYVAR
, as all input variables automatically become environment variables within
work units in your flow.
Any variables that you declare in work items in your flow but that you do not declare as input
variables in the flow can be accessed only through user variable format. For example, if you use the
variable #{VAR2}
in work items but do not declare VAR2 as an input variable to the
flow, you can access this variable only as #{VAR2}
in the command of a job or in
fields that support user variables in the Job Definition.
Procedure
-
In Flow Editor, select
.
-
In the General tab, Input Variables field, select
Modify, and click New to enter the input variables for
your flow.
For example, your flow has the input variables MYVAR and
VAR2. If MYVAR is set to 1 and
VAR2 is larger than 40, JOBA runs. If the
variables MYVAR or VAR2 are set to anything else,
JOBB runs.
For example, in the Flow Attributes, input variables, you specify:
MYVAR=1;VAR2=50.
-
Create the rest of your flow definition by referring to your input variables as
#{...} in your work items. You can, however, use
${...}
in
your scripts.
In this example, you added the variable evaluator and in the dependency arrows, defined:
#{MYVAR=1} && #{VAR2=40}.
-
Save your draft as a new version so that you can test it. Select .
-
You can now test your input variables in IBM Spectrum LSF Application Center by selecting the Workload tab, selecting
DefinitionsFlow Definitions, selecting your flow
definition, and clicking Submit.
The Submit Flow window is displayed and you can enter your input variable
values.
For example, enter MYVAR=1;VAR2=50.
You can check your flow in the Flow details pane by selecting the flow
name in the Workload summary list, then clicking the flow name to view more
information.