I’m encountering an issue when uploading and trying to load a workflow to the KNIME Server. The workflow fails to load and displays the following error messages:
Errors during load
Reason: SE 3 loaded with errors
Report Generation Stage 3:301
Errors creating flow object stack for node “Report Generation Stage 3:301”, (resetting flow variables):
Conflicting FlowObjects: org.knime.core.node.workflow.FlowScopeContext@7c102918 vs. org.knime.core.node.workflow.FlowScopeContext@f26db46 (loops/scopes not properly nested?)
Generate Monthly Reconciliation 3:302
Errors creating flow object stack for node “Generate Monthly Reconciliation 3:302”, (resetting flow variables):
Conflicting FlowObjects: org.knime.core.node.workflow.FlowScopeContext@7c102918 vs. org.knime.core.node.workflow.FlowScopeContext@f26db46 (loops/scopes not properly nested?)
It seems to be related to flow variable scopes or loop structures being incorrectly nested, but I’m not sure how to resolve this. This workflow runs fine locally in the KNIME Analytics Platform but throws this error only when uploaded to the server.
What’s strange is that I have several other similar workflows (for different countries) that follow the exact same process, and all of them run perfectly fine on the server. Only this particular one is failing with the error above.
Has anyone experienced this before, or does anyone know how to fix it?
Thanks in advance!
This was the current set-up for report generation stage and monthly reconciliation:
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.