Salesforce

Are Nested Transactions Possible (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Are Nested Transactions Possible? (Magic xpa 4.x)

Let us think for a moment what a transaction within a transaction is. In a nutshell, while there is an open transaction, the developer would like to have an inner transaction that will commit its commands to the database before the other transaction has finished. This transaction is independent of the other transaction. Let us look once again at our scenario. Dear Wilma wants to transfer money from the Savings account, but while she is doing that she also wants to update the zip code. This can actually be performed as a separate, independent transaction. In Magic xpa, this mechanism is called a Nested Deferred transaction. In the above scenario, we would have a separate program or task in which the transaction mode is defined as Nested Deferred, which will update the details of the account. For more information about nested transactions, see the Appendix.

When an inner transaction is committed, it is committed! If the external transaction is now rolled back, the inner transaction will not be rolled back. There is no connection between these transactions.

In this section, we have seen the concept of deferred transactions and seen how this can help us solve other problems that can arise.

For more information about deferred transactions, see Deferred Transactions vs Physical Transactions.

Reference
Attachment 
Attachment