Java Edit Variable: Set progress.

Hi All, is there a way to get an ExecutionMonitor in the java edit variable node? I’ve got a long running node with some detailed information about it’s progress and I don’t want to spam logger.warn(). Any hints?

1 Like

Hi Aaron,
I don’t think it is possible to get the execution monitor. The code generated by the snippet looks like this:

public class JSnippet extends AbstractJSnippet {

    // Fields for output flow variables
    /** Output flow variable: "test" */
    public Double out_test;

    // Your custom variables:

    // expression start
    public void snippet() throws TypeException, ColumnException, Abort {
        // Enter your code here:
        out_test = 99.97;
        // expression end

The snippet method does not have access to the ExecutionContext and the AbstractJSnippet doesn’t know it either :frowning:
Kind regards


You could create you own instance of NodeLogger that is configured to log somewhere other than the KNIME console, and then hand that off to your snippet’s parent class via attachLogger(NodeLogger)


That’s an interesting idea, thanks!