Publish output variables

If a chain step produces measurements, you can publish them as output variables to other steps down the chain. This enables you to pass information to later steps and child chains.

You can define your own measurements and pass them as output variables. For details, see Define measurements.

Guidelines for adding output variables

Follow these guidelines when entering output variables:

  • Use only these characters in variable names: a-z, A-Z, 0-9, and underscore (_).

  • Enter one variable-name=variable-value pair per line.

  • Measurement names are not case-sensitive. For example, newvar=${{Finding Count}} matches newvar=${{finding count}}.

  • An output variable value can contain the values of other variables or step measurements. Use the following syntax:

    ${{variable-name}} or ${{measurement-name}}

  • You can combine variables and measurements, for example:

    newvar=Step in ${{chainnum}} has ${{finding count}} findings

  • You can use escape sequences in variable values: newline \n, tab \t, return \r, and backslash \\.

  • Variable values defined in later steps override values in earlier steps.

    Example: If the same output variable is defined in steps 1 and 2, then step 3 uses the value from step 2.

Back to top

Pass output variables to later steps

When you publish output variables to next steps in a chain, only output variables are replaced.

To publish output variables:

  1. On the top navigation bar, select a space from the spaces list.
  2. On the Products page, open a product or Git repository.

  3. On the sidebar, select Chains.

  4. Open a chain from the chain list and click Edit.

  5. In the Steps tab, click the step from which you want to publish output variables.

  6. In the step's parameters, expand the Output Variables section and enter your output variables, one variable-name=variable-value pair per line.

  7. Click Save.

Your PulseUno agent makes a record of step variables in the step log, indicating what output variables have been overwritten. To view the step log, open the chain run's Log tab. For details, see View chain runs.

Back to top

See also: