Pop up messages using Java Snippet

Hi Team,
Can anyone help with creating pop up messages using Java Snippet node when the input data is empty?

Hi @binu_lap160 , Welcome to the KNIME community.

This workflow gives a simple demo, using java edit variable (the “variable” version of Java Snippet). Java Edit Variable is better suited in this situation because the table is empty, and so there are no rows to act on. However the code could be adapted for Java Snippet if you have other requirements.

Using Java popup message when table empty.knwf (78.4 KB)

I have added some words of caution to this workflow. Please take notice of them as using java message boxes from the java nodes can cause problems.

Make sure you save your work regularly as you can on occasion end up freezing your entire KNIME AP with the risk of losing any unsaved work should you have to then terminate the entire application. This can occur for example when the system gets “confused” about which dialog should be “in front” and you find that you have a modal popup dialog created by java which is then displayed “behind” your desktop application, leaving you no means of clicking it to close it.

So ultimately, use this at your own risk And I repeat… save your workflow (and other open workflows) often!

see also…

and

4 Likes

@takbb, thanks a lot for the information. It worked! :grinning:

1 Like

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