Execute a Workflow KNIME with a Batch file

Hi everybody,

I would like to execute a workflow KNIME with a Batch file but i have an error :  

ERROR KNIME-Worker-2 Call Local Workflow  Execute failed : java.lang.NullPointerException 

My workflow knime work well on Knime but i don't know why I have this error. 

This is my Batch file : 

"C:\Program Files\KNIME\knime.exe" -nosave -consoleLog -noexit -nosplash -reset 
-application org.knime.product.KNIME_BATCH_APPLICATION 
-preferences="C:\Users\Admnistrator\Desktop\KNIME_Preferences.epf" 
-workflowDir="C:\Users\Admnistrator\knime-workspace\SPC_SIMTest" 

I'm not find  solution.Can you help me ?

Hi Robunle,

Can you please post a minimal version of your workflow that allows us to reproduce this?

Cheers,

Roland

Hi RolandBurger,

Ok, i attached a small version of my workflow.

My small version of workflow knime work well on Knime but not with a batch file.

Thank you for your help.

 

 

 

Hi Robunle,

The workflow in your example uses the Call Local Workflow node to call itself. Can you please confirm that this is what you are trying to do?

Cheers,

Roland

Roland Burger,

In fact, I need the Call Local Workflow for export a BIRT Report Knime. I succed to do this thanks to this forum :

https://tech.knime.org/node/69887/view

The problem now that is I would like to execute automaticaly my workflow with a batch file but i have a problem with the Call Local Workflow. 

I would like to resolve this error from my Batch :

  ERROR KNIME-Worker-2 Call Local Workflow
  Execute failed : java.lang.NullPointerException 

Thank you,

Regards.

Hi Robunle,

Yes, I think I understand now what you're trying to do. In order to set this up like in the example you linked, you need two workflows. The workflow you call with the batch script needs to include a Call Local Workflow node, which needs to call another workflow.

Cheers,

Roland

Hi RolandBurger,

I follow your advise but i have the same error. Maybe i don't understand what do you say. 

Is it possible in your side to give me a workflow wich use a Call Local Workflow and a batch file which works well ?

Thank you 

Hi Robunle,

I have created an example workflow that creates a report via the Call Local Workflow node.

It also works if called from a batch file, I used this:

C:\Users\rb\Downloads\knime_3.4.0\knime.exe -nosave -consoleLog -noexit -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -preferences="C:\temp\workflows\preferences.epf" -workflowDir="C:\Users\rb\knime-workspace5\reportBatchExample\01_Generate_a_Report_and_Save_the_File"

 

Cheers,

Roland

Hi, can someone help me.  Where can I find the path for the KNIME_Preferences.epf?

preferences="C:\Users\Administrator\Desktop\KNIME_Preferences.epf"

 

Thanks

You can export your preferences under the ‘File’ tab. When I tried the example having the epf or not did not make a difference though.

In case someone stumbles upon this thread as I did: Here is how I solved my issue that produced the same error Call Local Workflow Error when using as Batch Application