Orka is an asynchronous, type-safe workflow engine for Rust. It is meant for multi-step business processes that have outgrown a single request handler but do not justify running a separate workflow service: order processing, onboarding sequences, multi-stage ETL jobs and similar flows.
A process is a Pipeline<TData, Err>: an ordered list of named steps working on shared, typed state. You declare the step names up front, then attach async handlers to each step's before, on and after phases. Handlers get the state as ContextData<T> (an Arc<RwLock<T>>) and return PipelineControl::Continue or PipelineControl::Stop. Steps can be marked optional or skipped by a condition. Pipeline::validate() reports setup mistakes before the first run. The shape of the process can be read straight from its definition.
Each pipeline is generic over your own error type, as long as it implements From<OrkaError>. Handlers can use ? on other errors and the conversion happens through From, so errors stay in your application's enum.
For branching, ConditionalScopeBuilder lets a step pick one of several scoped sub-pipelines at runtime. A scoped pipeline runs on a sub-context extracted from the main state and can merge its work back. Its pipeline can be defined up front or built by an async factory, which makes branching work as a plugin point for different strategies.
The Orka<ApplicationError> registry holds pipeline definitions keyed by context type and runs them with orka.run(ctx). A run ends as Completed, Stopped or Cancelled. A CancelToken cancels it from outside the running handler.
[]
= "0.3"
= { = "1", = ["full"] }Licensed under MPL-2.0. Source at https://github.com/excsn/orka and API docs at https://docs.rs/orka.
