6. Runtime View
April 8, 2026 · View on GitHub
6.1 Register a Customer
A garage employee registers a new customer through the web application.

Diagram source: diagrams/06-register-customer.puml
- Employee submits the customer form in the WebApp.
- WebApp sends a
RegisterCustomercommand to the Customer Management API via HTTP. - The API persists the customer to SQL Server and publishes a
CustomerRegisteredevent to RabbitMQ. - The WorkshopManagementEventHandler and NotificationService consume the event and cache the customer data in their local databases.
6.2 Plan a Maintenance Job

Diagram source: diagrams/06-plan-maintenance-job.puml
- Employee selects a date and vehicle, then plans a maintenance job.
- WebApp sends a
PlanMaintenanceJobcommand to the Workshop Management API. - The API loads all events for the
WorkshopPlanningaggregate (identified by date) from the event store. - Events are replayed to reconstruct the aggregate's current state.
- The command is executed on the aggregate, producing a
MaintenanceJobPlannedevent (and possibly aWorkshopPlanningCreatedevent if this is the first job for that day). - New events are persisted to the event store and published to RabbitMQ.
- The WorkshopManagementEventHandler updates the read-model.
6.3 Day Passes — Notifications and Invoices

Diagram source: diagrams/06-day-passes.puml
- The TimeService publishes a
DayHasPassedevent. - The NotificationService queries its local database for maintenance jobs planned for the current day and sends reminder emails to customers.
- The InvoiceService queries its local database for finished (uninvoiced) maintenance jobs, generates HTML invoices, and emails them to PrestoPrint.
6.4 Finish a Maintenance Job

Diagram source: diagrams/06-finish-maintenance-job.puml
The flow is identical to planning a job: load aggregate from event store, replay, execute command, persist new events, publish MaintenanceJobFinished. Downstream services (Notification, Invoice, EventHandler) consume this event.