there a way to stop the workflow if the Database reader returns an empty table.?
without getting this ERROR> ERROR Fail in execution 2:182 Execute failed: This node fails on each execution.
I used “Empty Table Switch” node. If the table contains data it can follow the normal workflow, if no data is present the workflow does not run.
Please find attached a screenshot of my workflow structure.
If I understand your problem correctly, you shouldn’t need the Fail In Execution node attached to the empty table switch. That node is used to simulate a failing node, so it will always return an error in the log.
If you take that node out and execute the workflow, you will either see your report generated if there is a table produced, or the report branch will be skipped entirely if no table is produced. I think that’s what you want, correct?
Sounds like something that might be better addressed with either the Try/Catch nodes, or perhaps with the Empty Table Switch nodes. If you would, please make a new topic with specifics of your problem, and we can try to come up with something.