parseExecutionHistory
function parseExecutionHistory(params): ExecutionOverlay;Defined in: src/execution.ts:1150
Reduce a Step Functions execution’s event history into a render-agnostic ExecutionOverlay: per-state status, attempts, duration, and the set of transitions the run actually followed.
Pure and deterministic — any surface (SVG, Mermaid, React, Action) can consume it without rendering. States entered multiple times (Map iterations) are aggregated: status escalates to the worst outcome, durations sum, and attempts total. For the un-aggregated, ordered form use buildExecutionTimeline.
Parameters
Section titled “Parameters”params
Section titled “params”Object parameters
events
Section titled “events”Ordered execution history events (from GetExecutionHistory)
Returns
Section titled “Returns”The computed execution overlay model
Example
Section titled “Example”import { parseExecutionHistory } from 'sfn-diagram';const overlay = parseExecutionHistory({ events });console.log(overlay.states['ProcessOrder'].status); // 'succeeded'