What to do when file doesn;t exits in folder
- 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
background:
folder with 100's of csv files. my workflow will pick the file name sthat starts with "Phone*.csv"
can be any number of files.
process:
I'm using directory tool to reach the file like this
directory name:
file type: Phone*.csv
Issue:
process works fine when files exits. but when NO file exists i get blank records but my process fails because i'm expecting file and data.
how to handle this.
when No files exits i get this blank
Process:
if file exists -- Good
If it doesn;t then stop the worflow. -- I'm having isues here
- Labels:
- Developer
- Interface Tools
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
See this example from @danilang about using a Message tool to generate an error, and setting the workflow configuration option to stop on error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can end the flow by adding a Count Records then filter for 0 count and attach a message tool to it. If this tool runs that means there is no data and you get a error "which you can define yourself". (Dummy flow for reference)
You can then stop the process by selecting "Cancel Running Workflow on Error" under Workflow - Configuration > Runtime. (Screenshot below)
 
 
