Triggering a workflow execution when a folder is empty (or the dataset is empty)

Posted over 1 year ago by Duane Quinn Callan (AMUNDI.IRL)

Duane Quinn Callan (AMUNDI.IRL)

Hi Guys
I am sure there is a simple solution to this but it seems to be eluding me :0)

I am adding logic to an existing .iox file, the logic is 'IF a particular folder is empty then do something'

Below I used the 'File Attributes' block to determine if a folder is empty or not, but in the below example the folder is empty but the block is in i cant kick off another process on the back of this event

Have you any ideas how I can (from within an .iox project) search a folder, and if its empty process some more blocks e.g. send a file to that or another location? 



0 Votes



Paola Tomei posted over 1 year ago Admin

The File attributes block is screening the contents of the parent folder, with the option to do filtering ("include Subfolder names") on the target folder, which we suspect is empty.

The output will contain some data, regardless of the contents of the folder X.

When we use a Record filter on the field [Enclosing folder] we can output the contents of the folder X and pass it to the Validate data block to decide whether this outcome should be passed on, or stopped by an Error action. (Record count validation criteria Max records is set to = 0)

This 'empty dataset' is then appended with some content and passed on for further processing.

You can find this project on our sandbox (also here attached as an ioz file), showing both empty and non-empty folder outcome when the logic is set to process only empty dataset as a trigger.

0 Votes

Login or Sign up to post a comment