Java Edit Variable (simple)

Edit a flow variable using java code. The node is analogous to the Java Snippet node: In the central panel, added java code to define or modify an existing variable. The variables available at the input are listed on the left. The allows you to select whether you want to overwrite an existing variable or define a new variable.

Options

Flow Variable List
The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).
Method Body
Enter your java code here (the entire source will be wrapped in a method). You can add the name of a variables by double-clicking its name in the left list. Note that numeric (double-compatible) variables will be handled as Double, int-compatible variables as Integer and any other variable type as String.
Compile on close
If unchecked, the syntax test is skipped when the settings are applied to the model, allowing the dialog to close even if there are syntax errors encountered. This enables the user to temporarily close the dialog, investigate the input table and then return to the almost-complete-and-running snippet code in the dialog. The node will not be executable (it will be red) if the code contains syntax errors. This option is only for convenience, it does not have any effect on the output of this node.
Return type
Specify here the resulting type of your code snippet. Unfortunately KNIME cannot determine what will be the correct return type - so you need to assist here.
Overwrite or define new variable
Specify whether you want to overwrite an existing variable or define a new variable.

Input Ports

Icon
Input variables (optional).

Output Ports

Icon
Output variables.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.