Run the workflow and follow every state
Execute the validated two-step DAG, follow each terminal state, and reconcile the final workflow result with the job output.
1. Objective
Goal
Run hdrctl workflow run workflow.yaml. Read the workflow start, the terminal status of run_first_job, the terminal status of record_completion, and the final 2/2 result.
Keep working from the cli-course folder. The job is named first-job, and the workflow lessons add workflow.yaml beside it; every command and terminal excerpt in this lesson was run against that same cumulative project.
Reading a result. Durations and process identifiers vary between machines — ignore them. What proves a run is the stable evidence: named files, resolved identifiers, row counters, step states, HTTP status. If one of those differs from the lesson, fix the previous step before continuing.
Prerequisites
- Lesson 9 completed and checked.
- The validated
first-jobCSV project. - A terminal opened in the
cli-coursefolder.
2. Steps
01Revalidate immediately before execution
Objective
Use the validated manifest as the exact input to the run.
Actions
- Run the workflow validator once more after any edit.
- Proceed only when it returns the clean verdict.
hdrctl workflow validate workflow.yaml
The same file that will run passes model and graph validation.
✅ Workflow valid — no errors detected.
02Run the workflow
Objective
Execute the job step and its dependent completion action.
Actions
- Invoke hdrctl workflow run with the manifest path.
- Wait until both step lines and the final summary appear.
hdrctl workflow run workflow.yaml
Both real steps reach OK and Hydra reports the observed total.
Workflow first-job-workflow ──────────────────────────────────────────────────────── ✓ Step 'run_first_job' OK (1.5s) ✓ Step 'record_completion' OK (0.0s) ✅ Workflow 'first-job-workflow' completed in 1.5s — 2/2 steps OK
03Read dependency order
Objective
Confirm the output order matches the graph declared in lesson 9.
Actions
- Locate
run_first_jobin the terminal output. - Confirm
record_completionfollows it. - Match that ordering to
depends_on.
Get-Content workflow.yaml
The second step's dependency explains why its terminal state appears after the job.
depends_on: [] ... depends_on: ["run_first_job"]
04Verify the data artifact
Objective
Connect the successful job step to its configured default output.
Actions
- Open
first-job/data/output.csv. - Confirm the workflow-run job produced the same two filtered records.
Get-Content first-job\data\output.csv
The orchestrated job preserves the cumulative pipeline result.
id,name,value 1,Alice,100.0 2,Bob,200.0
3. Checklist
| Verification | Expected result |
|---|---|
| Workflow name | first-job-workflow |
| Job state | run_first_job is OK |
| Action state | record_completion is OK |
| Final summary | 2/2 steps OK |
4. Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The workflow file is not found | The terminal is outside cli-course | Change to the course folder or pass an explicit file path |
| The job step cannot find its directory | The relative job path changed | Keep workflow.yaml beside first-job |
| The action does not run | Its dependency did not succeed | Inspect the job step result first, then rerun after fixing the job |
5. Next lesson
The CLI now creates, validates, tests, runs, parameterizes, inventories, and orchestrates the same project. The final lesson serves Hydra's FastAPI backend over that workspace and verifies the health endpoint.