i got a rule engine component where i have to put in a date which i getting written into the output data table.
Is there a way, when i execute the workflow, that a popup window shows up and i enter the date in the popup window field and it gets written in the rule engine component, so i dont have to open the component separately and then execute the workflow.
Its basically a easier way for my colleagues to start the workflow without knowing where they have to update the date for the output file.
another purist solution from my side, as I never clicked with these mega-fiddly “Widget” nodes (KNIME definitely deserves a for the most complicated and stressful “Close” button I’ve ever seen!).
Thanks for the quick replies guys!
Ive tried it with the Java Snippet but cant get it to work
I’ve copied your code into the expression_start field and i’ve changed the column name
and added an output field.
I alwas get the following error messag:
Error in line 29: JOptionPane cannot be resolved.
Is there a way to fix this without annoying you too much
Is there also the possibility that the input is inserted in all lines? Or do i always have
to type the date for every line?
Sure – here’s two ideas how to do it:
Use the second variant in the example workflow which works via flow variables as a foundation. Use a Variable to Table Column node to append the value from the flow variable to the table.
When you use the first example, modify the code in the Java Snippet node as follows:
// Your custom variables:
String text;
// -----------------------------
// Enter your code here:
if (text == null) {
text = javax.swing.JOptionPane.showInputDialog(null, "Hello human, what’s your name?");
}
out_name = text;
Hope this helps!
–Philipp
PS: I have updated the workflow on my NodePit space with two examples for what I described above.