This link explains some useful considerations about Flow Variables, that might be helpful.
My guess from the images is that the problem arises from one of the following sections:
- The component
- The Variable to Table Row, Table Row to Variable, String to Path series of nodes.
- The fact that Flow variables are passed along connections even without the formal red lines. Perhaps use of a Variable Filter node would help.
I asked KAI about Variable scope and got this reply:
In KNIME, variable scopes refer to the context in which flow variables are created and accessed. Here are the key points regarding variable scopes:
- Local vs. Global Scope:
- Flow variables created inside a component have a local scope, meaning they are only accessible within that component.
- Flow variables created outside a component are available globally to the entire workflow.
- Components:
- When you create flow variables inside a component, they are not available outside unless explicitly allowed. You can configure a “Component Output” node to allow specific local variables to exit the component.
- Filtering Variables:
- The “Variable Filter” node can be used to manage the flow of variables, allowing you to filter out unnecessary variables from being passed downstream, thus keeping the workflow clean and efficient.
- Scoped Contexts:
- Certain constructs in KNIME, such as loops and components, create scoped contexts. This means that variables defined within these contexts are isolated from those defined outside.
- Accessing Variables:
- You can access flow variables using the syntax $$[“Variable Name”] or $$variable_name for simpler names.
Understanding variable scopes is crucial for managing data flow and ensuring that your workflows remain organized and efficient.
Does any of that help?