18. Build order
Components
Each component is written in one form, kept in one place, and runs in one place.
| Component | Form | Kept in | Runs on |
|---|---|---|---|
| Engine host | One C# project (.NET isolated Azure Functions): API controllers, WorkflowInterpreter orchestration, Decider, activity functions, event, schedule, and archival functions | Engine repository | The Azure Functions app |
| Database schema | SQL migration scripts, applied in order | Engine repository | Azure SQL |
| Infrastructure | Bicep templates for every Azure resource on page 17 | Engine repository | Applied to the resource group by the pipeline |
| Gateway configuration | API Management policies: token validation, role checks, per-workflow tool and agent scope (generated), AI policies, agent endpoints | Engine repository; the tool scope fragment is regenerated by the pipeline | API Management |
| Worker SDKs | Wos.Worker (C#, NuGet package) and wos_worker (Python package) | Engine repository, published to the organisation's package feed | Inside each worker |
| Workflow definitions | JSON files, one per workflow, plus task definitions, event handlers, schedules, and instruction texts | Workflows repository | Registered into Azure SQL through the API; read by the interpreter |
| Workers | One container image per code area, built on a worker SDK | One repository per code area | Container Apps, or any host with outbound HTTPS |
| Teams bridge | A small service: posts cards, receives button clicks, calls the Task API | Its own repository | A Functions app or Container App |
| Pipelines | GitHub Actions workflows: validate and register definitions, generate gateway policy, deploy host, build worker images | Each repository | GitHub |
| Operator UI | A static web application over the engine API | Its own repository | Azure Static Web Apps |
Steps
| Step | Build | Components touched | Proves |
|---|---|---|---|
| 1 | Azure SQL schema; Decider; WorkflowInterpreter; HttpActivity; RecordActivity; metadata and workflow endpoints | Infrastructure (Functions, DTS, Azure SQL, gateway), schema, engine host, gateway token validation, pipeline for the host | A definition made only of HTTP tasks runs and is recorded |
| 2 | SWITCH, FORK_JOIN, DO_WHILE, WAIT, SUB_WORKFLOW, SET_VARIABLE, TERMINATE | Engine host | Control flow |
| 3 | HUMAN and the Teams bridge | Engine host, Teams bridge | A run waits for a person and continues |
| 4 | Service Bus queues; poll and update endpoints; Wos.Worker; wos_worker; one Container Apps worker with queue-based scaling | Infrastructure (Service Bus, Container Apps), engine host, worker SDKs, first worker image, worker pipeline | A worker task runs anywhere |
| 5 | LLM_CHAT, LIST_TOOLS, CALL_TOOL, CALL_AGENT; the human-gate registration check; gateway AI policies | Engine host, gateway tool scope and AI policies, definitions pipeline (policy generation) | Model, tool, and agent calls, with the write-tier rule enforced |
| 6 | Event handlers; schedules; Blob payload offload; status events | Infrastructure (Event Grid, Blob), engine host | Runs start from messages and timers |
| 7 | Archival; metrics; Fabric mirror; run control endpoints; operator UI | Engine host, infrastructure (monitoring, Static Web Apps), operator UI | Operations |