my_script.sh is a bash script inside one of my bash paths and with executable permissions. If I launch the aforementioned command from the console it works without problems but when it’s launched from the External Tool (Labs) node it trigger the following error:
Hi Ivan,
Thanks for your reply! The example workflow you pointed me at has a problem and cannot be run. The Java Edit Variable (simple) node says:
No such variable "knime.node(drop) size.sh" f type STRING
If I try to run the External Tool node in my workflow using the full path, the node is working but the problem is that the script which I’m using is calling other commands that are not found because the bash path is not “exported”.
Is there a way to run a command from the External Tool node, exactly as if it were launched from a bash terminal? (meaning containing all the bash paths)
Thank you in advance
I see. I have Windows so wasn’t even trying at first as the workflow fails for it sooner. The problem is there is no drop folder in workflow directory in the subdirectory “Java Edit Variable (#3)”. Create drop folder there and move script (the script is in data folder) in it and then it will work. New, modified workflow will be available soon on the same link.
Nop for the time being. Maybe alternative could be this node from community nodes:
This is really not my area so if I missed something don’t hold it against me
Finally I resolved this issue by simply putting a soft link of the executable in the /usr/local/bin dir.
With bash this can be done with the following command:
It’s a bit strange to me but it seems that the External Tool (Labs) node can look for executable files in the /usr/local/bin but it doesn’t in other dirs which are on the bash path.
Anyway it’s solved.
Thank you
It should be interesting to create a “generic” node or wrapper node where it’s possible to embed the executable or library inside the node with a tab “Add Executable” view in the “Java Edit Variable” node tab “Additional Libraries”. When you share your workflow, the executable is also shared because embedded.
The input is defined by a popup as a table of paths, or string, integer,… depending if the executable.
Same for the output (depending if the embedded executable output)
And one or more popups to define arguments needed by the executable (as usual KNIME flow variable, if needed).