You will add inspection and repair tasks to the repair-depot Starting State.
Add planned tasks
Replace the empty simulation.process.tasks array in start.workspec.json:
JSON
"tasks": [
{
"id": "inspect_pump",
"actor_id": "technician",
"start": "08:00",
"duration": "10m",
"location": "workshop",
"reservations": [
{ "resource": "test_bench", "mode": "exclusive" }
]
},
{
"id": "repair_pump",
"actor_id": "technician",
"duration": "20m",
"location": "workshop",
"depends_on": ["inspect_pump"]
}
]The inspect_pump task starts at 08:00. The repair_pump task derives its start from the completed predecessor.
Validate the schedule inputs
Run document validation again:
Terminal
npx workspec validate start.workspec.jsonExpected final line:
Text
✓ No problems foundInspect task status
Run the project through 08:30:
Terminal
npx workspec snapshot start.workspec.json --time 08:30 --jsonThe snapshot contains these task statuses:
JSON
{
"inspect_pump": "completed",
"repair_pump": "completed"
}Find these values under state.task_statuses in the output envelope.
Understand finite time
A snapshot at 08:15 leaves repair_pump active. That result is a valid partial run, not a failure.
Read tasks and scheduling and dependencies for the complete contracts.
Next step
Add Changes so the task timeline changes the pump.