How to stop a knime process and give out a warning if differences are found

Hi all,
i am looking for a way in Knime that if a condition X is meet to stop the process and give out a warning message.

In the following example X is the comparison of 2 files with table compare node gives us several differences between the 2 tables (not needed just in case you something to fiddle with):

So now that the “Table Difference Finder” has found 3 Differences.

Now i would like that this triggers the process to stop and that a pop-up appears with some error message. If the process runs through ok too, the main part is the error message to inform that something went wrong (preferably as pop-up and not just console).

I am trying this now for some while but i never seem to get anywhere with this. Any help appreciated.

Have a good and sunny day!

Hi @TotalDataLoss -

The first thing that occurred to me would be to use an Empty Table Switch node to determine if there were any differences found at all with the preceding Table Difference Finder. If there were none, you keep going. If there are differences, you could insert a Breakpoint node with a custom error message.

There are almost certainly other ways to approach this of course - Try/Catch would be more elaborate, but perhaps more flexible. But maybe this helps as a starting point.

2 Likes

Hi @TotalDataLoss, in addition, if you are running the workflow locally, there is a java snippet trick for displaying a custom popup message too… See this post

4 Likes

@Scott: Thank you, this didn’t give a pop-up but it worked and its handy that it writes it in red ink in the console.

@takbb:One can always count on you what ;)This would be exactly what i am looking for, darn that i can’t program in java. But it looks easy enough i will give it a go tomorrow i guess…

3 Likes

@takkb: even though i don’t understand a thing about java, it just worked beautifully - Thanks mate…

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.