Call Local Workflow Error when using as Batch Application

Hi,

I’m trying to execute a workflow as batch application. It contains a ‘Call Local Workflow’ node that calls a workflow in the same workspace.
It does work when used from within the the eclipse gui. When I execute it from the command line I get the following error:

ERROR KNIME-Worker-3 Node Execute failed: (“NullPointerException”): null

Knime.log contains the following line:

java.lang.NullPointerException
at org.knime.workbench.explorer.ExplorerURLStreamHandler.resolveMountpointRelativeUrl(ExplorerURLStreamHandler.java:227)

I attached a minimal working example. It fails when called as such:

knime.exe -consoleLog -noexit -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“D:/KNIME_workspace/call_local/mainflow”

The full knime.log is also included in the attachment.

I also saw this post: execute-a-workflow-knime-with-a-batch-file
While it sounds to be the same issue, I can’t figure out why the posted example works as batch application and mine does not. I suspected the path to the subflow since the posted example uses the URI scheme ‘knime://knime_workspace/…/…’ but KNIME behaves really unstable when I play around there. e.g. the URI changes back to a relative path when closing and reopening the workflow. The posted solution stops working when changing the path, even when trying to change it back. Feels like there are some caveats I am not aware of.

Maybe someone here knows what’s going wrong exactly?

Kind regards

call-local-batch-error.zip (12.5 KB)

You cannot use relative KNIME-URLs when running a workflow in the batch executor. Only the workflows pass on the command line is available and therefore there is no mountpoint or similar available to resolve relative URLs.

Thanks for the clarification.

So I tried a few more times by changing the path.

Ignore the following rambling. I found the reason for that behaviour (part of it at least) below.

But I have to say the configuration dialogue does not make it easy. Entering an invalid path does not change the entered path but it doesn’t show yet (sometimes). It reverts back to the previous entered path after reopening. Sometimes it reverts when reopening the whole flow only.
Or getting an IO Exception because there is no such workflow, but the message shows it tried accessing a path that is not entered anymore even after reopening the workflow and then the node configuration.
One time the path change back to simply “knime” while it tried to execute my absolute workflow path with a /knime added. Though I never entered that part at any time.
Switching from a absolute path to a knime.workspace relative path results in a popup that tells me that nothing was changed sometimes.

Comparing the path written in the settings.xml of the ‘Call Local Workflow’ node with the eclipse dialogue contents showed that it can be different even after saving everything. So you changed your path in the configuration dialogue but it just does not change for real.

Solution
Yes it was a path problem.

How I made it work for me
In the end the only reliable manner or in some cases the only way to change the path for me was: Edit the settings.xml of the Call Local Workflow node with a text editor directly.

I am having this exact issue.

What, specifcally, did you change in the node’s settings.xml?

Thank you for your help.

The nodes settings.xml should have a “workflow” entry, like this:

<entry key="workflow" type="xstring" value="knime://knime.workflow/../subflow"/>

And the value is the path to the workflow you want to call. I changed that value with a text editor directly there. You should be able to see the change take effect after saving in the editor. So opening the Node’s Configure Dialogue in Knime should show the same after your edit.

Hi @aweit ,
I’m new to KNIME and I would appreciate your help with this.
I’m encountering the same error… when I change the node settings.xml, I got an “No workflow path provided” error… I’m using the latest version of knime 4.1.2. Thanks!