Explicit transaction after using implicit transaction

I have this flow Service (we call it fullProcess)

– invoke adapterReading (with implicit transaction) (Kind of reading database)
– invoke updateFull

In updateFull

– invoke pub.art.transaction:beginTransaction
------ invoke adapterUpdateTable1
------ invoke adapterUpdateTable2
------ pub.art.transaction:commitTransaction
---- SEQUENCE (Exit on DONE)
------ pub.flow:getLastError
------ pub.art.transaction:rollbackTransaction
– BRANCH on lastError
---- $null : MAP (Nothing)
---- $default : pub.flow:throwExceptionForRetry

When I start (not in debug) the fullProcess flow service I have the following error :
The resource is already being used in a parent transaction.

After searching a lot, I found if I disable step invoke adapterReading, the error vanished.
So my conclusion is the LOCAL_TRANSACTION connection (using for all my adapters) open implicit transaction but I don’t know how to close it.

Have you an idea ?

Use adapterReading outside the explicit transaction boundary if it just select queries.

Also, by looking at the above code, you are using “pub.flow:throwExceptionForRetry” are you explicitly check the error message or code for transient error handling else, the code will retry for any data error which is not transient.

I do it but it doesn"t work !


As per the details and explanation provided I assume below: confirm if that is not the case.

adapterReading adapter service should point to NO Tx connection
updateFull adapter service should point to Local Tx connection

Then it will work without any errors.

1 Like

It is wat I do to solve the issue and after readong the documentation about the local transaction in Adapter User Guide, I found that a implicit transacton is used during all the connection. That explain my problem I think.

To solve it, I do as you suggest (put a no transaction for adapter for reading) and it is work

1 Like

Then you are good, this is what we follow and we have not to face any issues with it.

No Tx connection (select)

Local Tx connection (insert, upsert, delete, merge, update)

1 Like