Event Service Agent Kata

Modules & Interactions (within the Service Agent BC)

← Back to Design Docs ← Documentation Home

Scope

Overview

Module Interaction Map

flowchart LR
	API-->|commands|ORCHESTRATION
	ORCHESTRATION-->|commands|EXECUTION
	ORCHESTRATION-->|commands|TIMER
	TIMER-->|events|ORCHESTRATION
	EXECUTION-->|events|ORCHESTRATION
	API-->|queries DB|DB[(Domain DB)]
	ORCHESTRATION-->|writes DB|DB
		click API "./modules/api.md" "API Module"
		click ORCHESTRATION "./modules/orchestration.md" "Orchestration Module"
		click EXECUTION "./modules/execution.md" "Execution Module"
		click TIMER "./modules/timer.md" "Timer Module"

Swimlane (Module Roles & Flows)

sequenceDiagram
	autonumber
	participant API as API
	participant ORCH as Orchestration
	participant EXEC as Execution
	participant TIMER as Timer

	Note over API,ORCH: solid = command/port, dashed = event

		link API: Doc @ ./modules/api.md
		link ORCH: Doc @ ./modules/orchestration.md
		link EXEC: Doc @ ./modules/execution.md
		link TIMER: Doc @ ./modules/timer.md

	API->>ORCH: SubmitServiceCall (command)
	ORCH->>ORCH: validate + write DB (Scheduled)
	ORCH-->>API: domain events published (post-commit)
	ORCH->>TIMER: ScheduleTimer (command)
	TIMER-->>ORCH: DueTimeReached (event)
	ORCH->>EXEC: StartExecution (command)
	EXEC-->>ORCH: ExecutionStarted (event)
	EXEC-->>ORCH: ExecutionSucceeded|ExecutionFailed (event)
	ORCH->>ORCH: update DB to Running/terminal + publish domain events

Responsibility Matrix (lightweight)

flowchart TB
	subgraph Submit
		A[API]:::Do --> B[Orchestration]:::Own
	end
	subgraph Schedule
		B --> D[Timer]:::Supplier
		D --> B
	end
	subgraph Execute
		B --> E[Execution]:::Supplier
		E --> B
	end

	classDef Own fill:#e3f2fd,stroke:#1e88e5,color:#0d47a1
	classDef Supplier fill:#e8f5e9,stroke:#43a047,color:#1b5e20
	classDef Do fill:#fff3e0,stroke:#fb8c00,color:#e65100

Message Index

EDA without ES/CQRS (MVP)

Ports Used (overview)