activities

Transaction

A Transaction is a specialized sub-process with all-or-nothing semantics. All activities within must complete successfully, or the entire transaction rolls back via compensation handlers.

Category
activities
BPMN Spec
Section 10.2.5
Icon Class
bpmn-icon-transaction

What is a Transaction?

A Transaction is a sub-process with transactional semantics-either all contained activities complete successfully, or compensations roll everything back. It implements the saga pattern for distributed consistency.

Visual Representation

A Transaction displays as a rounded rectangle with double borders. The double border distinguishes it from regular sub-processes and indicates its transactional nature.

Key Characteristics

  • All-or-nothing: Either all activities succeed, or all are compensated
  • Compensation handlers: Each activity can have associated undo logic
  • Cancel boundary event: Catches transaction cancellation for alternative flows
  • ACID-like behavior: Provides consistency guarantees across multiple steps

Common Use Cases

Travel Booking

Book flight, hotel, and car as a transaction-if any fails, compensate all previous bookings.

Financial Transfer

Debit and credit accounts as a transaction ensuring funds are never lost or doubled.

Multi-System Update

Update multiple systems atomically, rolling back all if any system update fails.

Frequently Asked Questions

Try this element in Crismo

Create beautiful BPMN diagrams with our modern process modeling platform.