I wanted to pauze a complex workflow, depending on a variable, for the user to have the chance to manually correct a datatable in the middle of the workflow.
I thought I had found a solution: an ‘ok’’ pop-up in the middle of the workflow, giving the user the chance to adapt a datatable in another branch of the workflow . Once the user presses the ‘OK’ button in the pop-up, the entire workflow would continue.
Hi @yverhaeg , when it comes to running any data node, it’s a common mistake to forget that whatever runs in that node will be applied and run on each of the rows from the input.
And indeed, if you want to have a popup, you have to somehow reduce the data to 1 row. I understand what you said about losing your data, but that would normally be done as a forked branch, and you can even use an IF Switch to control if needed. In your case, it does not look you need to control it, so it can be done just by forking alone, and by reducing the rows to just 1 in the forked branch.
Something like this would do:
Because Node 2 is linked to Node 4, Node 2 will only execute after Node 4 is completed, that is only after the OK from the popup is pressed.
As you can see from my execution of Node 2, it’s queued and waiting for Node 4 to complete. I get only one popup, and my original data remains untouched. My 5 rows are still there:
This is much faster than what you implemented. My Java code is going through only 1 row, but in your case, while it’s going to do only one popup, it’s still going through all the rows, and even worse, it will run that if statement all the time, and if statements are slow (compared to not having them), and you are running that if statement for each row.