Warehouse execution (WES) · Supporting domain · EventStorming board
workforce-management
Tracks who is on shift and on which process path: commits each shift's headcount plan, assigns certified people to paths and flags paths that are short of people.
- events published
- 10
- commands
- 9
- policies
- 8
- read models
- 8
- hot spots
- 4
The story in 5 key events
The pivotal events: the few that matter most, in the order they happen.
- Pivotal eventShift
Plan Committed - Pivotal eventAssociate
Shift Started - Pivotal eventLabor
Assigned - Pivotal eventPath
Understaffed - Pivotal eventAssociate
Shift Ended
Listens to (3): contexts whose events this one reacts to
Tells (2): contexts that react to its events
The board, row by row
13 rows, in the order the business story happens: the main path first, then how this context reacts to the others, then the clock. Rows are small stories; read each one left to right.
- Event
- Command
- Actor
- Aggregate
- Policy
- Read model
- External system
- Hot spot
- Opportunity
-
Propose heads for a path
A shift lead asks how many people a path needs for a forecast workload. With no planned rate, the measured rate is used. If people on that work are often idle, the answer is trimmed. Nothing is saved.
ActorShift leadPolicyWhenever no rate is given, use the measured rate; trim the heads when the idle share is highRead modelMeasured task ratesRead modelIdle share per pathRead modelRequired heads per path and shiftCommandProposePath POST /paths/{pathId}/plan-proposalsPlan AggregatePathPlan EventShiftPlan analytics stream onlyProposed Source: application/usecases/propose_path_plan.go · domain/shiftplan/shift_plan.go · adr/0012-measured-rate-feed-for-propose-path-plan.md
-
Commit the shift's headcount split
A shift lead commits how many people go on each path. A line is refused if its heads exceed the stations installed, the hours the heads can work or the live station count. One announcement goes out per path line.
ActorShift leadRead modelProcess-path listRead modelLive station count per skillCommandCommitShift POST /shift-plansPlan AggregateShiftPlan EventShiftPlan Committed Systemwarehouse-planning PolicyTurns each plan line into a labour limit and flags a gap from its own labour planSystemwes-work- planning PolicyKeeps the latest labour plan per path for supervisors to look upSource: application/usecases/commit_shift_plan.go · domain/shiftplan/shift_plan.go · adr/0014-installed-capacity-ceiling.md
-
Start an associate's shift
A shift lead puts an associate on the roster with their certifications and, optionally, their site. Starting again for the same associate restarts the roster entry instead of failing.
ActorShift leadCommandStartAssociate POST /associates/{id}/shift-startsShift AggregateAssociateShift EventAssociateShift analytics stream onlyStarted Source: application/usecases/start_associate_shift.go · domain/associate/associate_shift.go
-
Certify an associate
A shift lead adds a certification, such as pick, pack or hazmat, to an associate on shift. A path that needs a certification can only take people who hold it.
ActorShift leadCommandCertifyAssociate POST /associates/{id}/certificationsAggregateAssociateShift EventAssociateCertified analytics stream onlySource: application/usecases/certify_associate.go · domain/associate/associate_shift.go · adr/0009-hazmat-certification-via-existing-path-gating.md
-
Start a break
A shift lead logs the start of an associate's break. Nobody can be assigned to a path while on a break.
ActorShift leadCommandStartBreak POST /associates/{id}/break-startsAggregateAssociateShift EventAssociateBreak analytics stream onlyStarted Source: application/usecases/breaks.go · domain/associate/associate_shift.go
-
End a break
A shift lead logs the end of the break, and the associate can be assigned to a path again.
ActorShift leadCommandEndBreak POST /associates/{id}/break-endsAggregateAssociateShift EventAssociateBreak analytics stream onlyEnded Source: application/usecases/breaks.go · domain/associate/associate_shift.go
-
Assign an associate to a path
A shift lead, or an agent acting for one, puts an associate on a path. They must hold the path's certification and not be on break. Moving someone ends their old assignment, so nobody is on two paths at once.
ActorShift leadRead modelProcess-path listCommandAssignLabor POST /associates/{id}/assignmentsAggregateLaborAssignment EventLaborAssigned analytics stream onlyEventLaborReassigned analytics stream onlySource: application/usecases/assign_labor.go · domain/assignment/labor_assignment.go · adr/0003-certification-gated-single-active-assignment.md
-
Spot a path that is short of people
Asking for a path's staffing gap compares planned heads with people actually assigned. If the path is short, a notice is raised as a flag only. Nobody is moved: a human decides.
ActorShift leadRead modelCommitted shift planRead modelActive assignmentsRead modelIdle share per pathCommandGetStaffing GET /paths/{pathId}/staffing-gapGap AggregateShiftPlan EventPathUnderstaffed analytics stream onlySource: application/usecases/get_staffing_gap.go · adr/0002-stop-at-the-path-boundary.md
-
End an associate's shift
A shift lead ends the shift. The associate's active assignment is closed first and its hours are logged against the shift.
ActorShift leadPolicyWhenever a shift ends, close the associate's active assignment and log its hoursCommandEndAssociate POST /associates/{id}/shift-endsShift AggregateAssociateShift EventAssociateShift analytics stream onlyEnded Source: application/usecases/end_associate_shift.go · domain/associate/associate_shift.go
-
Keep the heads the labour plan requires
warehouse-planning announces the heads each path needs per shift; the newest version is kept. A proposal with no workload uses those heads as they are, and the staffing gap shows them next to the people committed. Committing fewer is still allowed.
Systemwarehouse-planning EventLabourPlan Committed PolicyWhenever a labour plan line is committed, keep it if its version is newer than the one heldRead model · kept up to dateRequired heads per path and shiftSource: adapters/inbound/kafka/labour_plan_consumer.go · application/usecases/record_labour_requirement.go · adr/0043-propose-heads-from-the-published-labour-plan.md
-
Keep the process-path list
process-path-management announces every path that is defined, revised or retired. This context keeps its own list, used to check plans and to work out which certification a path needs.
Systemprocess-path- management EventProcessPath Created PolicyWhenever a path is created, revised or retired, update the local process-path listRead model · kept up to dateProcess-path listSource: adapters/outbound/kafkacatalog/consumer.go · adr/0030-kafka-sourced-process-path-catalogue.md
-
Keep the measured rates
labor-performance reports how long tasks really take and how idle people are. This context keeps the latest figures per task type, so a proposal can use a real rate and the staffing gap can show idle time.
Systemlabor-performance EventTaskPerformance Recorded PolicyWhenever a task's performance is recorded, update the measured rate and idle share of its task typeRead model · kept up to dateMeasured task ratesRead model · kept up to dateIdle share per pathSource: adapters/outbound/laborperformancecache/consumer.go · adr/0019-labor-performance-cache-consumer.md · adr/0020-idle-share-staffing-signal.md
-
Feed the labour report
The service reads its own announcements and keeps daily labour figures: shifts, breaks, certifications, assignments and understaffing. They feed the labour report.
Event · earlierLaborAssigned PolicyWhenever a labour or shift event is announced, add it to that day's labour figuresRead model · kept up to dateLabour reportSource: adapters/inbound/kafka/analytics_consumer.go · adr/0010-analytical-data-product.md
Hot spots and opportunities
Open questions and known gaps, each taken from a decision record or a document in the repository, never invented. Opportunities are improvements the documentation already names.
- Hot spotCommitting a shift plan asks fulfillment-execution live for station counts. If that call fails, the whole commit is refused. Moving it to events is a follow-up.
Source: docs/adr/0038-postgres-and-kafka-are-the-only-runtime.md
- Hot spotThe installed-station count on a commit is supplied by the caller and cannot be verified here, so a second check against the live count was added.
- Hot spotWith no planned rate and no measured rate yet for a path, a proposal comes back with zero heads rather than an error.
Source: docs/adr/0012-measured-rate-feed-for-propose-path-plan.md
- Hot spotMessages that cannot be processed go to a holding area with no alerting and no replay tool.
Source: docs/adr/0022-resilience-circuit-breakers-retry-dlq-shutdown.md
Opportunities
- OpportunityThe live call to fulfillment-execution for station counts, and the REST rollback for measured rates, are tracked as follow-ups to move onto events.
Source: docs/adr/0038-postgres-and-kafka-are-the-only-runtime.md
- OpportunityThe deprecated buildingId name will be removed only by a later announced breaking decision; siteCode is already the canonical name.
This board is a reconstruction from the code and documentation of workforce-management at origin/develop, not a workshop output. Roles are the ones the documentation names. How the boards were made.