Handling Successful Flows in Knime Try-Catch: Avoiding Redundat Error Messages

I have a workflow that consists of three components:

  1. View 1 (component): A search function.
  2. View 2 (component): A query based on the search results.
  3. View 3 (component): A message displaying a user reference ID and logging it to a database.
  4. View 4 (component): An error message for the user in case any of the other views fail.

I’ve noticed that the try-catch mechanism works a bit differently in KNIME. When a routine fails in views 1, 2, or 3, it properly catches the exception and displays view 4 with the error message. However, when the routine is successful, the flow also goes through the port 0 of the catch node, thus displaying the error message as well.

Do you have any ideas on how to solve this?

Hi @elosbin,

To make sure I’ve understand your case perfectly: You have your 4th view after the catch node and there is a text view which displays the error message if a node has failed. You problem is that you don’t want to have the 4th view in case all nodes were exeecuted successfully. Is that right?

If yes, you can use a switch node like IF Switch after the catch node to have the last component executed (and displayed) only in case of a failure.

If you have further quesitons, please don’t hesitate to ask.

1 Like