Skip to content
BL19 edited this page Aug 7, 2026 · 1 revision

Welcome to the Spindle wiki!

Spindle is a durable workflow engine for C# that uses code-first principles for authoring workflows. Spindle allows you to run long-running workflows with minimal resource usage while staying close to the C# native syntax.

Example

This is one of the simpler ways to define a flow, the Name field is not required but a useful convention for accessing the name of the flow in a typed way.

public sealed class ExampleFlow : ISpindleFlow<Unit, Unit>
{
    public static FlowName Name { get; } = new("example-flow");

    public async ValueTask<Unit> RunAsync(IFlowContext ctx, Unit _)
    {
        await ctx.Step<int>(
            id: "dummy",
            name: "Dummy step",
            execute: () => ValueTask.FromResult(0));

        return Unit.Value;
    }
}

Clone this wiki locally