How to stop workflow if file not found
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have a workflow and that is scheduled. I have used DYNAMICE INPUT tool to import last updated file but the problem is sometime source data not updated due to technical issue and workflow run with previus day updatd file which is incorrect. I want a condition if file name ( workview reprot mm.dd.yyyy) if not found then workflow stop.
- Labels:
- Dynamic Processing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
2 Options
- If you know the filename and that it has the date at the end, then use a formula tool to build up the filename and pass that into the dynamic input, then if todays file is not there, it wont run and will error
- Use the Directory tool, get a list of all files in the directory, filter the files to look for one with todays date in the filename or created date, again, if no file for today, the workflow will error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@prpanw Take a look at the Message tool. You can create exactly what you are looking for. What you will do is create an error message in the tool based on your requirements as you mention after your Input Tool. So you'll have a second stream coming out of the Input tool. Then in your workflow configuration window (click on the canvas) in the Runtime settings you will see that you can cancel the workflow upon an error. This will then stop the workflow based on your message tool which is creating the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@prpanw i think you should add a filter tool before the dynamic tool to check the creation date of the file
if the date is today of no conditions are meet this will push no records further and this will stop.
you can use this method and even add a message tool if the sum of record is 0 this will flag a error message.
hope this help.
