Manually Setting the Exit Code Through A Workflow

I want know if I can set the EXIT CODE from my workflow run through a powershell script.  For example when I identify an unexpected empty table using the EMPTY TABLE SWITCH node, I want to end my workflow but return an error so the powershell script can respond with the appropriate alerts.  

This is not possible.

Thanks thats what I was afraid of.  My work around was to use the external tool node.  I ude it to write an error and execute an alert command.

Hi smcleod and Thomas,

even though there is no KNIME feature to manually set the exit code, I just successfully tested the brute force alternative of calling


in a Java Snippet node. But please use with care and save your changes before trying it -> it will terminate the process incl logging right away.

Best regards



you could use "Extract Table Dimension node" and "Java Snippet Node",  in the snippet you could test the dimension and if 0 generate the Abort exception.

if(c_Dimensions == 0)
throw new Abort("File is empty! >>0<< " );