Skip to content
docsv0.1.0

TransitionNotAllowedException

Thrown by {@see \Milpa\Workflow\Contracts\StateMachineInterface::transition()} when a requested state transition is not defined, disabled, or blocked by a failed gate — carries the from/to states, domain, and (when a gate blocked it) the missing fields/evidence a caller needs to retry successfully.

TransitionNotAllowedException::__construct()

public function __construct(string $fromState, string $toState, string $domain, ?string $gateCode = null, array $missingFields = [], array $missingEvidence = [], ?string $reason = null):

Parameters

Parameters of __construct()
NameTypeDescription
$fromStatestringEstado origen
$toStatestringEstado destino
$domainstringDomain (opportunity/project)
$gateCode(string | null)Código del gate que bloqueó
$missingFieldsarray<string>Campos faltantes
$missingEvidencearray<string>Evidencias faltantes
$reason(string | null)Razón adicional

TransitionNotAllowedException::getFromState()

public function getFromState(): string

TransitionNotAllowedException::getToState()

public function getToState(): string

TransitionNotAllowedException::getDomain()

public function getDomain(): string

TransitionNotAllowedException::getGateCode()

public function getGateCode(): ?string

TransitionNotAllowedException::getMissingFields()

public function getMissingFields(): array

TransitionNotAllowedException::getMissingEvidence()

public function getMissingEvidence(): array