Stepped Actions: workflow orchestration for Rails

I just released Stepped Actions, a Rails engine for orchestrating complex workflows as a tree of persisted actions that run through Active Job. It’s extracted out of Envirobly and battle tested in it’s current form for over a year.

Stepped is built around a few ideas that I have wanted in Rails for a long time:

  • Action trees: a root action runs step-by-step and each step can fan out into more actions.
  • Concurrency lanes: actions share a concurrency_key so work runs one-at-a-time where it should.
  • Reuse: an optional checksum can skip work that is already achieved or share currently-performing work.
  • Outbound completion: keep an action performing and complete it later from an external event.

If you are on Rails >= 8.1.1, the install is straightforward:

gem "stepped"

Head over to GitHub for the full README and examples.

Hacker News post with discussion.