On start transaction event

On start transaction event


We are using outsystems 10 with an extension to an Oracle database.

I like to give some Outsystems context to the Oracle database transaction, as the first action in a transaction.

How can I build an action in outsystems which will only be executed when a new Oracle transaction is started.

HI Fred,

There are no extensibility points that allow you to know when a new transaction is started (or ended).

By what you said I'm assuming you are using a "Database Connection" for that database, right? In an extension you can get the Request Tansaction using the RuntimePublic.Db API (using the ForExternalDatabase method) and see if you needed to anything in it. But you would need to call that action yourself before your accesses to the database.

Note: this would only work fine in Oracle since the current implementation uses the same transaction for multiple readers (concurrent queries). Most of the database implementations may use more than one transaction if necessary to overcome driver limitations. So there are no guaranties that the RequestTransaction is used for all queries, specially on the ones that use Read Uncommited isolation levels.

Hi João,

Thank you for your answer. 

I like to execute a stored procedure every time a new transaction is started. But you said there is no event I can use to define this functionality.

In My current solution I do it now every time I access the database using a call to an advanced query in a core module. So if there is no way to do it once at the beginning of the transaction, I think I don't need to make an extension and using the RuntimePublic.Db api.