Output Variable Only Visible in Last Sequence

I have created a very simple flow as you can see below:
image

I’m encountering an issue where my output variable is only visible in the Pipeline Out of the last Sequence. For example, if I have a sequence with the condition "%input1% == 3", the output is visible. However, when I add a new sequence (e.g., "%input1% == 4"), the output variable disappears from the previous sequence and only shows up in the newly created one.

Why is the output variable only accessible in the last sequence, and how can I make it available in all sequences?

Thanks!

That’s the usual behavior of output variable, it will only be visible if it is the last step or if it has a value assigned. You can disable all the steps except the first one and use the button on the picture below to initialize it in the first step.
image

4 Likes

(A bit off topic for the question, but thought this may be helpful)

Using this style of BRANCH is okay, but in general I always advocate for not setting “Evaluate labels” to true and instead do this:

BRANCH on ‘/input1’
…1: SEQUENCE
…2: SEQUENCE
…3: SEQUENCE

IMO, this is easier to read and does not require someone to expand the BRANCH block to see what variable is being used. Also reduces the repetitive use of the same expression.

Another helpful aspect is one can use regular expressions in the label.

BRANCH on ‘/input1’
…/[123]/: SEQUENCE

This will match when input1 is 1 or 2 or 3 (or 12 or abc1xyz – need to be precise with the regex pattern).

But usually just simple literals are sufficient.

For some reason, many people (including those I work with) always want to use an expression on the label. Not sure why. As mentioned, sometimes doing so is necessary/helpful but IME, it is mostly not necessary.

4 Likes