ediverse Explore the platform

Spotlight PEPPOL BIS Billing 3.0 The EU e-invoicing mandate is here — France Sept 2026, Belgium Jan 2026, Germany 2025.

Saga Orchestration

The transactional pattern for multi-system EDI workflows: no XA, just application compensations.

Problem

An EDI cycle crosses several systems (ERP, WMS, TMS, billing) that do not support XA. How to ensure end-to-end consistency when a step fails midway?

Forces

  • Cross-system XA is neither available nor performant.
  • Without compensation, a crash between step 3 and step 5 leaves the system inconsistent.
  • Compensations must be idempotent (replayed multiple times without harm).
  • A complex saga must be observed and resumed after crash.

Solution

Define the workflow as a sequence of N steps, each with its explicit inverse (compensation). A centralized orchestrator (Process Engine, Temporal, AWS Step Functions) executes step after step. If step K fails, the orchestrator executes compensations from step K-1 → 1 in reverse order. EDI example: (a) book PO, (b) reserve inventory, (c) schedule transport, (d) create invoice. Failure at (d) → compensation (c) (release transport slot), (b) (release inventory), (a) (cancel PO).

EDI implementation

In EDI, Saga Orchestration is the realistic path for multi-system workflows. Walmart case: an inbound 850 must (1) create the order in the ERP, (2) reserve inventory in the WMS, (3) plan the 856 in the TMS, (4) emit the 855. If (4) fails (TMS down), the orchestrator triggers (3) release-stock, (2) cancel-order, and sends a negative 855 to the partner. Implementations: Temporal, Camunda Saga, AWS Step Functions Saga, Conductor.

Anti-patterns

  • Saga without a compensation for every step — a mid-flow crash leaves state inconsistent.
  • Non-idempotent compensation — a retry cancels the same reservation twice.
  • Stateful saga orchestrator without persistence — an orchestrator crash loses the in-flight saga.
  • Saga with cyclic dependencies — compensation can loop infinitely.

Sources