How to integrate a "Directoty watch" in a KNIME workflow

Hi guys,

we have a image acquisition softwar, which is constantly producing data while the acquisition proceeds. Those data will be analyzed using a KNIME workflow.

My plan is to set up a "directory watch" inside the KNIME analysis workflow in a way, that every new file is processed instantly when it arrived. This way the user would not have to wiat until the complete acquistion is over.

But I do not really know, how to set up this "dirwatch" knot. So any help is really arriciated.

Cheers,

 

Sebi

 

I'm not sure you can do this from within a workflow. I don't believe you can really trigger events in such a way. 

You coudl run a workflow from the command line though and have a script that identifies when a new image has come in and then runs the workflow. Might be worth looking at the headless/command line running in the FAQ. 

Would be glad for someone to prove me wrong though!

Cheers

Sam

Hi Sebi,

the most elegant way would be to have a dedicated loop start node for that purpose.

But for now maybe this

 might help in your case, too? Because a similar question recently arose here.

(required extensions are at least: quickform and filehandling nodes)

Best,

Martin

Hi all,

I recently faced the same need so I did some kind of light-weight alternative to the previous propositions. I also rely on the recursive loop in combination with a python node to get the state of the folder.

The second python node for the processing can be replaced by other processing nodes, however the output data at the loop end can sadly not be visualised before the loop finishes.

In this configuration, the loop runs for a given number of iteration defidne in the loop end configuration but it can also be stopped using a flow variable. The loop can also be stopped by cancelling the workflow but in this case no visualisation is possible.