Skip to Content

Transactions

Introduction

You can set any event to run as a transaction. For a transaction to succeed and be committed to the database, all parts of it must succeed. If any part of a transaction fails, the whole transaction fails, and no changes are committed to the database.

If the execution type (foreground or background) doesn't change, events called by a transaction event are included in the transaction. If the execution type does change (from foreground to background, or from background to foreground), called events are not included in the transaction.

Transactions use the underlying database's implementation. As this varies by vendor, App Builder commits or rolls back transactions in reverse order of their being opened.

Tip

If the underlying database doesn't support transactions, you can use rollback handlers instead.

How to enable transactions

To enable transactions on an event, follow these steps:

  1. Go to the Rule Event Detail page for the event.

  2. Expand the Execution Properties settings panel.

  3. Select the Transaction checkbox:

    Transaction option