Variable gets lost on its way to DB Transaction End

Hi

I have the problem that one flow variable in the DB Connection Executor is lost on the way to the following DB Transaction End as you can see from the pictures.

Please find my workflow attached.
load sources.knwf (141.8 KB)

I am still looking for a workaround.

Kind regards

Thiemo

Hi @Thiemo.Kellner , I couldn’t find specific reference in the documentation for the DB Transaction nodes, but I’m assuming that this behaviour is by design, so any variables created within the transaction are lost (just like can happen in loops).

The following could be a workaround for you though. It uses the Vernalis community nodes to store variables to a file and then read them back “on the other side”.

Here is a demo workflow

database transaction flow variables.knwf (39.2 KB)

1 Like

Hi @takbb

Thank you for getting at this issue. I feel, flow variables are a dark chapter in my book, as well as transaction handling.

Thank you for your solution proposal. I have another solution, possibly intended all the time by KNIME. I figured, I can connect the DB connection of the transaction end to the transaction start of the next transaction. Under the impression that “non-transactional DB connection” means that the connection is incapable of transactions, I did not do that from the beginning. I presume, I was mistaken and “non-transactional” stands for “no transaction open”. By connecting the flow variable port from the predecessor of the DB Transaction End to the next DB Transaction Start, I have the variable I am looking for… quite strange to me. Be it as it may, I stumble over the next flow variable behaviour I cannot make sense of, but am very uncertain whether to ask in this thread or to open a new one.

Hi @Thiemo.Kellner , if you’ve managed to resolve the specific problem that you raised in this thread then I would say it’s best to open a new problem as a new thread. By all means refer back to this thread via a link if you think there may be useful related info here.

But if the new problem is a continuation of the one raised here and you’ve not resolved your original issue then I’d say add it here.

It sounds to me though that a new thread would be best as more people are likely to look at it. In which case mark the solution to this thread (even if the solution you mark is your own reply)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.