Wait... Node for a file creation event

I have created a simple workflow like this:
WS000001

My desired operation is,
move the target csv file after it have been created by CSV Writer.
But it doesn’t work (the file wasn’t moved).

the setting of Wait… Node.
WS000001

Where is my mistake in this workflow?

Maybe the Wait… Node is not necessary here, but I’m worried about the file will be moved before the CSV Writer finished it’s job.
Or maybe just wait for 1 second time will be all right here, but 1 second is too long because I have too many files to be operated so that cause time consuming.

Please let me know if further information is needed.

Thanks in advance.

1 Like

Hi @qianyi,

I think the problem with the wait node in this example is that it starts after the csv writer is already done. The node does not recognize that the file is being created because it is already there when it starts. You don’t need a wait node in between to make this work. The csv writer will only allow the next node to start once it has finished writing the file to disk.

I could not get it to work with the wait node reliably because the problem is that it needs to start before the csv writer (otherwise it will not notice the file change - as in your workflow) but cannot be a direct predecessor to the csv writer (otherwise it would wait forever).
Cheers,
Johannes

3 Likes

Hi, @johannes.schweig

Thanks for the reply!
I have confirmed the workflow can work fine without wait node. But I do think I will need to use wait node after a file creation in next task. So your comment is very helpful. Will continue finding how it can work properly with wait node.

Cheers,
Qianyi

Try deleting the Wait node, and connecting the flow variable port on CSV writer directly to the List Files node; the List Files should only be started after the CSV node finishes its execution.

4 Likes

Hi, @quaeler
Have done, it works well. Thanks!
Cheers,
Qianyi

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.