You have an easy way and a slightly complicated way you can do that
When the first task goes to list the files and none are found, it should by default error out. The default error codes should be like this:
So, if there are no files the first task will fail. Using this failure allows you stop the job right there with standard flows
This will, however, create a failure every time and, if you are like me, you will want to avoid failures.
So option 2 would be similar to what you are doing but instead of using the Flow you will use a condition. You may very well be able to do it the way you show but I am more familiar with the condition sets and the nice thing is they are "re-usable". Meaning, you can use them for multiple jobs.
So, keep your task #1 the way it is and set your flows back to Default. Also, make sure you uncheck the File Not Found in the Error Section so any situation where files are not found will not be considered an error. Change from this:
to this:
Task #2 will have a condition enabled to accomplish your goal.
Create a new condition by following the steps below
- notice how the box is blank. Do not type anything in. The "No Output" you see when the job runs is just for you and not actual words so this box is blank.
Then OK all the way out but make sure you check mark the Condition you set.
Your job should look like this
Edited by user
2021-09-21T14:41:00Z
|
Reason: Not specified