#traits #bpm #engine #load-save #token #token-store #reclaim #outbox #cas #fired

bpm-engine-storage

Storage traits and types for the BPM engine (process, token, timer, history)

1 unstable release

0.2.0 Jan 30, 2026

#2 in #reclaim


Used in 2 crates

MIT license

9KB
173 lines

bpm-storage

Persistence abstractions for the BPM engine. Defines async traits only; no concrete backend.

Role

  • ProcessInstanceStore — load/save process instances, list running.
  • ProcessDefinitionStore — load process definitions by id.
  • TokenStore — load/save tokens by instance, claim (CAS), update.
  • TimerStore — get by id, mark fired, insert, list due.
  • ExternalTaskStore — create, fetch-and-lock, complete, fail, reclaim expired locks.
  • Additional traits: ParallelJoinRepo, CompensationRecordRepo, OutboxRepo (event outbox).

Implementations live in adapter crates (e.g. bpm-adapter-memory).

Usage

Depend on this crate to implement a new persistence backend. The runtime and server depend on these traits.

Documentation

See docs/database-schema.md and docs/architecture.md.

Dependencies

~0.8–1.8MB
~37K SLoC