Get a ProcessPath's normalized, end-to-end capacity
GET/process-paths/:id/capacity
Loads the ProcessPath identified by id (an ACTIVE process flow first, else the locally declared path; the response says which in source, docs/adr/0025), loads each of its steps' ProcessCapacity for the given location and window (matched by COVERAGE, see below), normalizes each step's effective rate into ORDER/period via the WorkloadProfile factors supplied on the request (Phase 2 simplification: there is no dedicated WorkloadProfile persistence yet), and returns the minimum normalized rate plus which step is the bottleneck.
Each step's candidate constraints are (a) the constraints of the ProcessCapacity aggregates of (process, location) whose window COVERS [window_start, window_end) -- registered window start < window_start AND registered window end >= window_end, so an equal window covers it -- taking, per constraint type, the one from the covering window with the LATEST start (tie: the narrower window); older or wider covering windows' constraints of the same type are shadowed, other types still apply (docs/adr/0003), and (b) a DERIVED STATION constraint = the stations facility-layout tallied across the zones of the site (zone ids starting with <location>-) x the declared StationStandard, when both a station count above zero and a standard exist. EVERY candidate is normalized to ORDER/hour before the minimum is taken. With stations but no declared standard the step uses (a) only and warnings says so. step_breakdown and warnings are additive fields.
Request
Responses
- 200
- 400
- 404
- 422
- 500
Normalized ProcessPathCapacity and bottleneck step.
Malformed window_start/window_end/units_per_order/packages_per_order, or a window whose end is not after its start.
No ACTIVE process flow and no locally declared path under id.
A path step has neither a registered ProcessCapacity whose window covers the requested window at this location nor a derived STATION constraint, or the WorkloadProfile is missing a needed conversion factor / has an invalid one / cannot normalize a step's native unit.
An unexpected failure (a store or outbox error). Answered as problem+json (internal-error). A 5xx answer is never stored under an Idempotency-Key and rolls back the aggregate change and its outbox rows, so the retry re-executes.