Hey I have given a condition in Filter tool i.e Count = 0 after the directory tool checks if a file is present at a location.Then after the directory tool I have attached the Count Record tool which return 0 when there is no file present and 1 if a file is present.
But even after the file is not present and the condition is true, my filter tools runs the false part.
I have attached the workflow below: -
The filter doesn't stop processing it will just dictate how many records go to each process. If you want to stop processing one way you could do it is by putting each of the processes in a container and enabling/disabling the container at runtime.
If you want to stop processing with Count = 0, you could use a Test tool on the False anchor of the Filter. If a test fails, the Test tool creates a descriptive error message.
And maybe use a Block Until Done to send your email first.
Or for your email.... you could change the workflow options to send an email on error, under menu path Workflow Configuration > Events. And under Workflow Configuration > Runtime, check the box for Cancel Running Workflow on Error.
Chris