Last week I had at least one workflow getting partially reset when loading and connections going nowhere and a node with no input. It confused me but I think just some strange error.
I now realized that KNIME 4.7 seems to delete some nodes on opening a workflow. here is an example:
Notice the missing connection from Row Splitter to Column Filter. Since these are older workflows it’s hard to know what actually happened here but in this case the metanode has a name that tells me exactly what was removed: one of my custom nodes.
I have part of the log below which is probably relevant. No t be totally fair the issue probably occurs because I need to update the nodes? Some guide what part to update would be welcome.
Anyway the core probelm here is the behavior of KNIME. KNIME should not just delete an invalid node. It should fail to load the workflow and make the error more clear. The console is riddled with error messages about the workflow reset. The fact a node failed to load and was omitted is easily missed in the sea of the other, not very uncommon errors.
Removing a node in the middle of the workflow makes the workflow unusable anyway on top of it if you don’t immediately notice the issue you will save it and then the workflow is corrupted as you might not remember what exactly was removed.
Probably relevant part from log:
2023-02-06 07:01:43,594 : DEBUG : ModalContext : : RowFilter2PortNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,597 : DEBUG : ModalContext : : AppendedRowsNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,598 : DEBUG : ModalContext : : HiLiteHandler : StructureToName : 3:160:169 : Adding hilite manager to handler 2c77eade-45c2-49a5-82a3-8e5c392f12c3
2023-02-06 07:01:43,598 : DEBUG : ModalContext : : HiLiteHandler : StructureToName : 3:160:169 : Adding hilite translator to handler 739d08ae-27d8-48fc-9f41-af1defda2f03
2023-02-06 07:01:43,601 : DEBUG : ModalContext : : StructureToNameNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,602 : ERROR : ModalContext : : FileWorkflowPersistor : StructureToName : 3:160:169 : Unable to load node with ID suffix 166 into workflow, skipping it: Found interface org.knime.core.node.workflow.WorkflowContext, but class was expected
java.lang.IncompatibleClassChangeError: Found interface org.knime.core.node.workflow.WorkflowContext, but class was expected
at com.givaudan.knime.internal.StructureToNameNodeModel.getWorkingDir(StructureToNameNodeModel.java:172)
at com.givaudan.knime.internal.StructureToNameNodeModel.<init>(StructureToNameNodeModel.java:56)
at com.givaudan.knime.internal.StructureToNameNodeFactory.createNodeModel(StructureToNameNodeFactory.java:13)
at com.givaudan.knime.internal.StructureToNameNodeFactory.createNodeModel(StructureToNameNodeFactory.java:1)
at org.knime.core.node.NodeFactory.callCreateNodeModel(NodeFactory.java:520)
at org.knime.core.node.Node.<init>(Node.java:307)
at org.knime.core.node.workflow.FileNativeNodeContainerPersistor.preLoadNodeContainer(FileNativeNodeContainerPersistor.java:197)
at org.knime.core.node.workflow.FileWorkflowPersistor.loadNodeContainer(FileWorkflowPersistor.java:979)
at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:8698)
at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:8600)
at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:8714)
at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:8600)
at org.knime.core.node.workflow.WorkflowManager.postLoad(WorkflowManager.java:8714)
at org.knime.core.node.workflow.WorkflowManager.loadContent(WorkflowManager.java:8600)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8464)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8385)
at org.knime.core.node.workflow.WorkflowManager.load(WorkflowManager.java:8358)
at org.knime.core.node.workflow.WorkflowManager.loadProject(WorkflowManager.java:8202)
at org.knime.workbench.editor2.LoadWorkflowRunnable.run(LoadWorkflowRunnable.java:171)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
2023-02-06 07:01:43,608 : DEBUG : ModalContext : : ColumnMergerNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,611 : DEBUG : ModalContext : : DataColumnSpecFilterNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,615 : DEBUG : ModalContext : : StringManipulationNodeFactory : StructureToName : 3:160:169 : Factory is already initialized. Nothing to do.
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169:163(1) to node 3:160:169:165(1)
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169(0) to node 3:160:169:169(1)
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169:165(1) to node 3:160:169(0)
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169:169(1) to node 3:160:169:163(1)
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169:168(1) to node 3:160:169:165(2)
2023-02-06 07:01:43,616 : DEBUG : ModalContext : : WorkflowManager : : : Added new connection from node 3:160:169:167(1) to node 3:160:169:168(1)
2023-02-06 07:01:43,620 : DEBUG : ModalContext : : Node : Column Merger : 3:160:169:167 : reset