Skip to content

Workflow Runner

A pipeline executed by BlowRunner, Blow's headless workflow engine: steps run in dependency order and in parallel, a branch picks one path, a join waits for both inputs, a flaky step is retried with backoff, an approval step waits for you, and the run can be paused, stopped, re-run from a step and played back. The canvas only shows the run, through RunStates fed by BlowRunStates.

Ready to run.
bigsmall
Fetch
Parse
Validate
Enrich
Merge
Big batch?
Approve
Archive
Store
Notify
bit Blow

Try it

  • Press ▶ Run. Validate and Enrich run at once after Parse; Merge waits for both; Big batch? sends the rows down one branch only, and the step on the other branch is skipped. Edges that carried a value are animated.
  • Set Rows over 100 and run: the big-batch branch stops at Approve, shown as waiting with a pause bar. Press ✓ Approve or ✕ Reject in the toolbar.
  • Tick Enrich is flaky: it fails twice and succeeds on its third attempt - the status line says each retry. Tick Enrich is down instead: it fails after three attempts, and Merge and everything after it are skipped.
  • Press ⏸ Pause during a run: the steps working finish, nothing new starts until ⏵ Resume. ■ Stop cancels the working step (a square badge) and skips the rest.
  • After a run, select a node and press Run from selected: only it and what follows run again; the steps before it keep their results. Drag the Replay slider to play the last run back event by event.
  • Break the graph - drag from Notify's handle back to Fetch - and Run refuses with the reason, marked on the node.

How it works

  • new BlowRunner(options).Handle("step", handler, new BlowNodeRunOptions { Retry = ..., Join = BlowJoinMode.All }) registers what runs each node type. RunAsync(nodes, edges, request, token) runs the graph with no UI and returns a BlowRunResult: an outcome, a record per node (status, attempts, duration, error) and every event.
  • A handler reads its inputs from the BlowNodeRunContext (GetInput<T>, RunInput) and returns a BlowNodeResult: Done(value) sends the value along every edge, Branch("big", value) only along the edges from that handle, so the other path is skipped.
  • ctx.WaitAsync(task, "Waiting for approval") shows the node as BlowRunStatus.Waiting until the task completes. BlowRetryPolicy tries again with exponential backoff; a BlowNodeException's message is shown, any other exception's is not.
  • BlowRunRequest.OnEvent = _states.Apply keeps a BlowRunStates up to date, handed straight to RunStates; its ActiveEdges animate the edges. Control = new BlowRunControl() pauses and resumes, the token stops.
  • StartAt = selected ids, Resume = last.ToCheckpoint() re-runs part of the graph. last.StatesAt(n) gives the states after the first n events, for the replay slider.
An unhandled error has occurred. Reload 🗙