Global flow variables not visible inside components


I am trying to run workflows from the command line. This is OK in itself but there is a complication when global workflow flow variables are involved with components. By global flow variable I mean the kind one creates in the KNIME Explorer, right-clicking on the workflow and using the Workflow Variables… menu item.

I want the behaviour of a node inside a component to change depending on the presence or absence of a global flow variable set on the command line. I don’t want to set the flow variable using the above context menu mechanism in the Analytics Platform GUI. The problem is the flow variable isn’t (or doesn’t appear to be) visible to that node inside the component unless it is explicitly allowed by configuring the Component Input Configuration. This is backed up by the YouTube “Simple metanodes and wrapped metanodes”. However, the flow variable doesn’t appear in that configuration window unless it’s been set using the context menu approach described above.

Is this correct? Is the workaround/fix that I have to actually set the variable anyway via the Analytics Platform GUI. If so doesn’t that partly negate the point of setting these flow variables on the command line? The fundamental questions is, is there some way to make the flow variable visible to the nodes within/inside the component from the command line? Sorry if I missed something obvious.

Many thanks,

1 Like

Hi @mccabe,

You can solve this by selecting the “Enforce exclusion” option in the component input configuration. By selecting this option when there is no variable in the “Exclude” list, all variables are allowed inside the component even those you create at workflow run time as global variables.
In my opinion, the better option is to use the “Wildcard/Regex Selection” option. So you can define a specific pattern to allow some particular variables in. That way you can create global variables that match your pattern and will be allowed inside the component and at the same time, no other variables are allowed inside the component.


1 Like

Awesome - many thanks!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.