The document discusses different types of transactions in business processes and IT systems. It defines ACID transactions which must be atomic, consistent, isolated, and durable. For example, an electronic funds transfer. It also discusses two-phase commit protocol used for ACID transactions. Business transactions are not usually ACID but must complete fully or rollback. Compensation boundary events are used to link activities to compensating activities that undo the work if the transaction fails.
3. 3
The term transaction refers to the coordinated execution of multiple
activities such that they either all complete successfully or the system
is restored to a state equivalent to none of them completing.
Transactions
4. 4
ACID Transactions
ACID stands for:
Atomic – indivisible, all-or-nothing behavior.
Consistent – preventing an inconsistent state of the system, such as a
debit with no corresponding credit.
Isolated – the systems managing each account are locked during execution
of the transaction.
Durable – the state of the participating systems is stored in a database, not
just in memory, so it can be restored in case of a crash.
ACID relates to Distributed Database Operations
6. 6
Example: electronic funds transfer in a bank.
The transaction debits one account and credits another account. This requires the
coordinated action of two databases (two independent systems). If, for some reason,
the debit and the credit cannot both be executed simultaneously.
In IT systems, ACID transactions are using
a special protocol called Two-phase
Commit.
Transaction manager software, first
communicates with the various resources
performing each side of the debit and the
credit, to ensure they are all ready to execute.
Two-phase Commit Protocol
Transaction Manager
8. 8
Business Transactions
• Business processes work as Transactional subprocess,
• means that its component activities must either all complete successfully or
the subprocess must be restored to its original consistent state.
• Business Transactions are usually not ACID transactions coordinated via
two-phase commit. The reason is they fail the I, or isolation.
• the transaction must be short-running, taking milliseconds to complete.
9. 9
Compensation Boundary Event and Compensating Activity
• The Compensation boundary event is used to link an activity to its undoing,
or compensating activity.
• It has an association linking it to a single compensating activity.
• a Compensation boundary event can only be triggered after the attached
activity completes successfully. If the activity has not started or is still running
when the transaction fails, or if the activity itself completes unsuccessfully, its
compensating activity will not run.
11. 11
Cancel Event
• The Cancel event, with the X icon, is a special form of Error event that may
only be used with transactional subprocesses.
• It is used when the source of transaction failure is within the transaction
subprocess.
• Cancel supports throw catch from an end event of the transactional
subprocess to a boundary event or event subprocess.