The Connector is executed in a Recursive loop, I just want to be sure whether it automatically creates, for each iteration, a new DB Session, and then automatically closes it when passing into the next iteration.
If this is not the case, I’ll be in trouble with too many open DB Session to DB for just one WF execution ?!!!
Hello Thanh Thanh,
the DB session is tied to the status of the DB Connector node that creates it. As long as the connector node is executed (green) the connection is opened. Once the node is reset (yellow) or the workflow is closed the connection is destroyed.
So when your DB Connector node is part of the recursive loop body e.g. connected to one one the nodes in the loop via a flow variable connection the node will be re-executed along with all the other nodes in the loop body and thus the connection closed and opened with each loop iteration.
If the connector node is outside of the loop the DB connection stays open while the loop is executing.
Bye
Tobias