Rules and Transactions

In Aware IM data processing may occur under the following scenarios:

  1. An external request has been issued to the system, which triggered rule evaluation (see Rule Evaluation). This external request may have been issued either from the User Interface or from an external software system.
  2. A notification has been received by Aware IM, which triggered rule evaluation.
  3. A timer event triggered scheduled processes to start executing (see Scheduling).

The following section describes how Aware IM handles database transactions when processing data under the above scenarios (transactions are described in the Data Storage section).

With scenarios 1 and 3 data processing occurs within a context of a single transaction. This means that if something goes wrong all changes that have been done by any of the rules between the start of the external request (or when the scheduled process started) and the error are discarded (transaction is rolled back).

What can go wrong? First of all a transaction is rolled back if any of the rules issues the REPORT ERROR action. This action indicates an unrecoverable operation error so the current transaction is immediately rolled back and any prior changes are discarded1). A transaction is also rolled back in case of an internal error.

With scenario 2 the behaviour of the system is slightly different. The rules attached to a notification event are considered to be independent and are executed within separate database transactions, so if one rule fails anywhere it does not affect other rules attached to the notification – their changes are committed provided that these changes themselves did not cause errors.

See also:


1)
Transaction is not rolled back if process failure rules are defined for a process that started rule evaluation in the first place – see Process Failure Rules.
  • Last modified: 2022/09/13 18:15