Hi,
When is the start and end time of a transaction?
Is it the same as the start and end time of Server Action?Or is it the same as the start and end time of DB access?
I found the following information, but I don't know which of the above two is correct.Is there any other answer?
https://success.outsystems.com/ja-jp/Documentation/11/Reference/OutSystems_Language/Data/Database_Reference/Handling_Transactions
https://www.outsystems.com/forums/discussion/70111/about-reactive-web-outsystems-transaction-boundaries/
https://www.outsystems.com/forums/discussion/2830/transactions-in-the-outsystems-platform/
Can anyone help me?Thanks
Each server action called from a client action will have its own transaction (each call to a server action from client action opens a REST call to the server, it's a separate request). Once you are in a server action, any server actions it calls will be in the same transaction. Each call to a service action will start a new transaction.
Of course, you can call CommitTransaction in a server action, which will end the transaction and start a new one, but that is a rare thing.
The transaction ends when the main request is completed, an exception is thrown, or commit/abort transaction is called.
J.Ja
Hi Justin,
Thank you for your response.
Your explanation is very helpful.
To also include the exceptions on how it works:
1. Traditional Web Submit Screen actions - The transaction ends after the screen is reloaded (including a rerun of the Preparation)
2. Service Actions - are actually REST API's and have their own transaction.
Hi Remco,
Your information is very helpful.