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.
Press Tab to move between the nodes and edges of the diagram.
Press Enter or Space to select it, Shift with Enter to add it to the selection, the arrow keys to move the selected nodes, Delete to remove them and Escape to clear the selection. Press C to start a connection from it.
Press Enter or Space to select it, Delete to remove it and Escape to clear the selection. Press C to move its end to another node.
bit BlowTry 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 aBlowRunResult: 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 aBlowNodeResult: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 asBlowRunStatus.Waitinguntil the task completes.BlowRetryPolicytries again with exponential backoff; aBlowNodeException's message is shown, any other exception's is not.BlowRunRequest.OnEvent = _states.Applykeeps aBlowRunStatesup to date, handed straight toRunStates; itsActiveEdgesanimate 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.