Running workflows
Execute a registered Flow and inspect its complete RunResult.
Find a definition through FlowCatalog and execute it through IFlowRunner. The result includes overall status and the steps visited.
Add an endpoint
Extend Defining workflows with these imports:
Map the handler before app.Run():
Place the request type after the top-level statements:
This local inspection handler returns full step inputs and outputs. Choose response fields and access policy before exposing it to product users.
Understand the handoff
The first step receives request.Text. After success, its output replaces the input for the next step. Review receives the summary, not the original source plus all prior results.
After a failed step, a failure target receives the input that entered the failed step. Error details are recorded in the result, not automatically appended to the next input.
Read the result
| Field | Meaning |
|---|---|
Status | Overall completion or failure. |
FinalOutput | Last successful output on completion. |
StepResults | Visited steps, inputs, outputs, status, and tool calls. |
ErrorMessage | Failure information when available. |
A recovered run can be Completed and still contain failed steps. Inspect the step results.
The cancellation token reaches downstream execution. The runner can record execution exceptions as failed steps; do not assume cancellation always propagates as an exception.
Continue with Failure handling.