How to stop workflow if empty table using Fail in Execution NODE

Dear all,

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.

Looking for your suggestion !
Thanks.

Hi @Mokrani -

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?

yes exactly basicly when i have a full table the workflow generate for me the Report PDF, else i receive this error when its Empty Table

If you remove the Fail In Execution node entirely, you shouldn’t see the error in the log any more, and your workflow should behave as intended.

But how about the case when it is necessary to Fail in execution Knime orkflow if is EMpty table?

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.

1 Like

in the version of KNIME 4.7 the node “fail in execution” is not available. How can I stop the execution of the workflow in this version ?

@Pipepalencia welcome to the KNIME forum. The node is still there you will just have to install the extension

2 Likes

If you just want to stop the flow then Breakpoint might also be a useful node.
br