Skip to content
docsv0.1.0

ResolvesDefinitionNameTrait

Shared by {@see ProcessListPendingApprovalsTool} and {@see ProcessSubmitDecisionTool}: both need to reconstruct a {@see \Milpa\Orchestrator\ProcessInstance} for a stream id they did NOT just create, which needs a {@see \Milpa\Orchestrator\ProcessDefinition} — this engine's core classes ({@see \Milpa\Orchestrator\ProcessInstance}, {@see \Milpa\Orchestrator\Reducer}, ...) are generic and know nothing about a registry or a "definition name", so that bookkeeping is confined to this tool-layer convention instead: {@see ProcessInstantiateTool} stamps the registry name it resolved into the `ProcessStarted` bootstrap event's payload under `_definition` (mirroring how it also stamps `_requester`), and this trait reads it back.