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.

GitHub ↗ · Documentation ↗ · Architecture check · Briefings

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.

  1. Pivotal eventShiftPlanCommitted
  2. Pivotal eventAssociateShiftStarted
  3. Pivotal eventLaborAssigned
  4. Pivotal eventPathUnderstaffed
  5. Pivotal eventAssociateShiftEnded

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
  1. 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 lead
    PolicyWhenever no rate is given, use the measured rate; trim the heads when the idle share is high
    Read modelMeasured task rates
    Read modelIdle share per path
    Read modelRequired heads per path and shift
    CommandProposePathPlanPOST /paths/{pathId}/plan-proposals
    AggregatePathPlan
    EventShiftPlanProposedanalytics stream only

    Source: application/usecases/propose_path_plan.go · domain/shiftplan/shift_plan.go · adr/0012-measured-rate-feed-for-propose-path-plan.md

  2. 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 lead
    Read modelProcess-path list
    Read modelLive station count per skill
    CommandCommitShiftPlanPOST /shift-plans
    AggregateShiftPlan
    EventShiftPlanCommitted
    Systemwarehouse-planning
    PolicyTurns each plan line into a labour limit and flags a gap from its own labour plan
    Systemwes-work-planning
    PolicyKeeps the latest labour plan per path for supervisors to look up

    Source: application/usecases/commit_shift_plan.go · domain/shiftplan/shift_plan.go · adr/0014-installed-capacity-ceiling.md

  3. 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 lead
    CommandStartAssociateShiftPOST /associates/{id}/shift-starts
    AggregateAssociateShift
    EventAssociateShiftStartedanalytics stream only

    Source: application/usecases/start_associate_shift.go · domain/associate/associate_shift.go

  4. 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 lead
    CommandCertifyAssociatePOST /associates/{id}/certifications
    AggregateAssociateShift
    EventAssociateCertifiedanalytics stream only

    Source: application/usecases/certify_associate.go · domain/associate/associate_shift.go · adr/0009-hazmat-certification-via-existing-path-gating.md

  5. 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 lead
    CommandStartBreakPOST /associates/{id}/break-starts
    AggregateAssociateShift
    EventAssociateBreakStartedanalytics stream only

    Source: application/usecases/breaks.go · domain/associate/associate_shift.go

  6. End a break

    A shift lead logs the end of the break, and the associate can be assigned to a path again.

    ActorShift lead
    CommandEndBreakPOST /associates/{id}/break-ends
    AggregateAssociateShift
    EventAssociateBreakEndedanalytics stream only

    Source: application/usecases/breaks.go · domain/associate/associate_shift.go

  7. 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 lead
    Read modelProcess-path list
    CommandAssignLaborPOST /associates/{id}/assignments
    AggregateLaborAssignment
    EventLaborAssignedanalytics stream only
    EventLaborReassignedanalytics stream only

    Source: application/usecases/assign_labor.go · domain/assignment/labor_assignment.go · adr/0003-certification-gated-single-active-assignment.md

  8. 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 lead
    Read modelCommitted shift plan
    Read modelActive assignments
    Read modelIdle share per path
    CommandGetStaffingGapGET /paths/{pathId}/staffing-gap
    AggregateShiftPlan
    EventPathUnderstaffedanalytics stream only

    Source: application/usecases/get_staffing_gap.go · adr/0002-stop-at-the-path-boundary.md

  9. 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 lead
    PolicyWhenever a shift ends, close the associate's active assignment and log its hours
    CommandEndAssociateShiftPOST /associates/{id}/shift-ends
    AggregateAssociateShift
    EventAssociateShiftEndedanalytics stream only

    Source: application/usecases/end_associate_shift.go · domain/associate/associate_shift.go

  10. 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
    EventLabourPlanCommitted
    PolicyWhenever a labour plan line is committed, keep it if its version is newer than the one held
    Read model · kept up to dateRequired heads per path and shift

    Source: adapters/inbound/kafka/labour_plan_consumer.go · application/usecases/record_labour_requirement.go · adr/0043-propose-heads-from-the-published-labour-plan.md

  11. 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
    EventProcessPathCreated
    PolicyWhenever a path is created, revised or retired, update the local process-path list
    Read model · kept up to dateProcess-path list

    Source: adapters/outbound/kafkacatalog/consumer.go · adr/0030-kafka-sourced-process-path-catalogue.md

  12. 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
    EventTaskPerformanceRecorded
    PolicyWhenever a task's performance is recorded, update the measured rate and idle share of its task type
    Read model · kept up to dateMeasured task rates
    Read model · kept up to dateIdle share per path

    Source: adapters/outbound/laborperformancecache/consumer.go · adr/0019-labor-performance-cache-consumer.md · adr/0020-idle-share-staffing-signal.md

  13. 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 figures
    Read model · kept up to dateLabour report

    Source: 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.

Opportunities

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.