Right now I am working on a solution which will be used by non-programmers and people who don’t know knime.
So, I was asked if there was a feature which tells the user that the ‘workflow ran successfully’. It doesn’t matter if the message is pop-up or just a message in the console.
Even I just realized that there is no such feature !
It’s a bit sketchy, but you can put a Java Snippet Node at the end of your workflow with one of the following lines:
logInfo("WF ran sucessfully"); logError("WF ran sucessfully"); logDebug("WF ran sucessfully"); logWarn("WF ran sucessfully");
This prints to the console. Only Error and Warning messages are shown with the default settings, and these are probably not the best choices. Java Snippets require and input with at least one row, and the Java Edit variable will pop these messages upon reseting. Maybe it’s more of a “this exists” than a good solution to your problem. Found here:
There’s also a way to make proper pop-ups, but I haven’t tried it myself yet. Also requires a Java Node at the end of your workflow:
Thank You for the fast reply @Thyme ! Will try these solutions and let you know.
I forgot a GUI detail:
There’s green buttons to execute the selected node (and all upstream nodes) or all nodes. Those buttons are greyed out when they wouldn’t do anything. That’s the tricky part: The left one (single node) is greyed out when there’s no node selected that can be executed, so only the right one “counts”.
Thank You @Thyme !
I am using a Java Edit Variable at the end of the workflow using (you may also use Java Snippet )
JOptionPane.showMessageDialog(null,“Workflow ran successfully.”);
Though it is simpler to use logWarn(“WF ran successfully” );
It creates a simple warning message in the console and I don’t know why but logInfo and logDebug are not creating messages in the console.
Hi @berserkersap , just be aware that the popup works only in the backend, that is via Knime AP. If you run your workflow via the webportal, this will not work.
Regarding “logInfo and logDebug are not creating messages in the console”, this could be because your log level is configured to ignore these. You can change this via the Preferences:
Thank You @bruno29a for the information !
Right now we are using just the Analytics Platform on local and not the web server. Though I am not sure if we will go to that.
After you have pointed out I tried changing the settings but still not able to get the messages for Info and Debug .
Hi @berserkersap , sorry wrong settings. The ones I showed your was for the logs for the log file.
For the console, it would be in the KNIME GUI setting:
Be aware though, that there are other DEBUG and INFO messages that spit out during operations, so you will see all these messages along with your messages.
An additional note for the messages, whether popup or console, the message will popup/display as many times as the number of records you have as input to your Java Snippet. So may need to do a row filter to keep only 1 record just before your Java Snippet so that the message executes only once.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.