I recently wanted to implement a DB transaction node in one of our Knime Server workflows, which contains a “generic loop start” and “variable condition loop end” node.
Unfortunately the loop can’t resolve and I get the error message “Loop start and loop end are not in the same workflow”. Without the transaction, the loop works like intended.
I also build a new test workflow with inserts random rows to a table in a database in the loop with the same result but a slightly different error message “Encountered loop-end without compatible end!”. This also happens with other loop end nodes.
I have been looking into this, and have been able to recreate the issue - in particular the fact that the loop works OK when the Transaction nodes are removed. This seems strange to me but I am not a DB expert.
Let me check with our developers on this one - if we end up with a new bug ticket I will update here.
we found that there is a problem of the loop end to find the corresponding loop start again. In such a case, it is useful to wrap the nodes into a component, which will make it easier for the algorithm to execute the loop.
Since this example uses an empty table as loop input the would create an endless loop. You can catch this by replacing it with a node, where you can simulate a nearly endless loop, by setting the loop count to a very high number.