This example shows that the opt-in DAG (eager) engine supports:
- Internal interrupts (HITL) via
graph.Interrupt(...) - Checkpoints via
WithCheckpointSaver(...) - Resume from an interrupt checkpoint
The program runs twice:
- First run: it executes until it hits
graph.Interrupt(...)and pauses. - Second run: it resumes from the saved checkpoint and finishes.
flowchart LR
entry --> ask
ask --> after
From this directory:
go run .Flags:
-engine bsp|dag(default:dag)-resume <value>(default:ok)
- The first run prints the interrupt event and its
checkpoint_id. - The second run prints the completion event and the final state.