PAM 4.3 SP01
Using the Get Directory Content operator. If the directory has no files in it, the operator keeps running until a file is created in the directory. How do I get the operator to finish when the directory is empty?
The Get Directory Content operator is working as expected.
One of its use cases is to wait for another process to drop a result file
in a folder or somewhere in the folder tree. If it is not there it would
wait. Insanely, this is the default behavior for this Operator.
In order to simply list the contents of a folder or a folder tree, where
there is some chance that no file or folder will meet the pattern you need
to explicitly set a timeout, and provide the timeout port.
Instead of using timeout settings I would test something like the following Modify your process so that you run - Delete File Operator (delete the existing files) - Write File Operator (create a dummy file) - Get Directory Content Operator So the ""Get Directory Content Operator "" should always find at minimum 1 file. A file count greater 1 should point to a problem with the ""Delete File Operator"".
I was using the operator to ensure that the directory was empty. Now that I understand about the wait feature I used the timeout to exit when the directory is empty.
Retrieving data ...