Batch Mode Workflow with Call Workflow Nodes

[ KNIME v.4.4.1 ] [ Windows ]
Hello,
I am trying to run a workflow in batch-mode that is encountering a strange error. The workflow runs perfectly in GUI mode. The error I am getting is pasted below. It appears to be caused by the Call Workflow node. Here is my batch cmd:

"C:\Program Files\KNIME\knime.exe" --launcher.suppressErrors -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -reset -nosave -data "C:\Users\<user>\workspace" 
 -workflowDir="C:\Users\<user>\workspace\my_workflow"
 ERROR : KNIME-Worker-0-Call Workflow (Table Based) 0:1 :  : LocalNodeExecutionJob : Call Workflow (Table Based) : 0:1 : Caught "IllegalArgumentException": Argument must not be null
java.lang.IllegalArgumentException: Argument must not be null
	at org.knime.core.node.util.CheckUtils.checkArgument(CheckUtils.java:255)
	at org.knime.core.node.util.CheckUtils.checkArgumentNotNull(CheckUtils.java:242)
	at org.knime.core.node.util.CheckUtils.checkArgumentNotNull(CheckUtils.java:105)
	at org.knime.core.node.workflow.FlowTryCatchContext.setError(FlowTryCatchContext.java:92)
	at org.knime.core.node.Node.execute(Node.java:1077)
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:559)
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:365)
	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:219)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Hi, I previously did some investigations on this and failed to get it to work. Instead I now export the output from Workflow 1 and read it into Workflow 2, both of which I call from a single batch file one after the other. Sorry I couldn’t have been more help.

@dpowyslybbe - Thank you for your input!

In my particular case, the solution you provide will work. However, I can foresee instances where a workflow might have so many different dependencies and interactions that this solution would be limiting. One of the benefits of using the Call Workflow node is that exceptions (anywhere in the workflow that is called) are propagated to the higher level, and it is easier to catch errors that might occur anywhere in the child workflow.

The underlying causes/reasons of why batch mode behaves so differently from GUI mode will continue to intrigue…

1 Like

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