I am working in Windows 10 with version knime Analytics 4.6.5 and having this feature.
When you import a number of workflows ion one go using the “Workflow Import Selection” using “Select root directory” the workflows (as filename.knwf) are not being recognized as valid workflows in “Workflow Reader” node under certain circumstances.
If you read the workflows using Local File System address everything is ok.
If you read the workflows using the Relative to, or Mountpoint address the node says the file is not a valid workflow.
As I need relative references to send the workflow to different peers, no idea how to deal with this issue. Any idea?
(as alternative, if you try to generate a temp folder and use the Transfer Files nodes to the temp folder, the process fails telling that to move workflows you need to use Workflow Read/Writer nodes)
If you import the files one by one via select file in Workflow Import Selection everything is ok, but that is not what I prefer :-))
Hi @fitofeijoo ,
Welcome to the KNIME community!
Could you please share a dummy workflow with the problem you are facing since it would help us better understand the problem?
Alternatively, would it be possible for you to update to the latest KNIME AP and then test this scenario?
I confirm that what you have explained here is correct and I could reproduce it on my system. I had a great discussion with my great buddy @gab1one about this and it seems there is a complicated explanation for this behavior but…
to solve your issue here and to be able to execute knwf files using a relative path, you can use a Local File System Connector node and use the local address of the current workspace (using the flow variable “knime.workspace”) and then use the “Local File System” option in the Workflow Reader node to address the knwf file relative to the current workspace.
I should add that even that the Workflow Executor node executes successfully while addressing a knwf file (locally), it doesn’t necessarily executes the target workflow unless you have connected your flow to a Container Output node.
Thank you. It works in my PC if I choose a fix directory. But there are two things that are puzzle me. First, when I add the Connection Port to the Workflow reader I do not see where I can use the variable 'knime.workspace" being created by the “Local File System Connector”. The second issue is that to generate the ‘knime.workspace’ variable I can use any node, right?
Following your suggestion, the only idea is to generate a variable type path using that ‘knime.workspace’ via a “String Manipulation (Variable)” and “String to Path (Variable)” nodes and then using the new variable to feed the workflow reader.
As that is working, even it is not so clean, for me the issue can be closed with the workaround.
If you download the whole workflow group, you can run the parent workflow to actually execute the child workflow (.knwf file) to create a dummy excel file inside the same workflow group. I have described each step in both workflows.
The “knime.workspace” flow variable is global and accessible by all nodes in the workflow. You have to use it in the Local File System Connector configuration (flow variables tab). Then you use a relative path in the Workflow Reader node.
Right. This variable is auto generated in all workflows and is accessible by all nodes in the workflow.
That does not work for me. Everything is clear and ok for the “Local File System connector” node. Variable is as you toId me. I have both workflows, being the child in the right place, but, as said, I can not use the variable ‘knime.workspace’ in the “Workflow Reader Node” (as the only option there in the combo box for “Read from” is “Local File System”, other options for Read From has disappear as soon as I connect the Local File System Connection, so the option “Relative to” is not available. And the ‘knime.workspace’ is a string and it can not be used neither as variable in the tab “Flow Variables” of the “Workflow Reader”.
Now, if you open the “parent” workflow and execute all nodes, there will be a dummy XLSX file in the same workflow group. (you may need to right-click on the workflow group and select refresh right after the execution of the workflow to see the file)