NodeRefused
A node did not run, because whoever is driving the run does not hold what the node declares it needs. It is thrown by {@see NodeInvoker} BEFORE the node's handler is reached, so nothing of the node happened. It is an exception only for the few lines between the invoker and {@see GraphRuns}, which turns it into what it really is — a line in the run's log and a result the caller reads. A host that drives a {@see NodeInvoker} with its own {@see \Milpa\Orchestrator\ProcessRunner} catches it there.
NodeRefused::__construct()
public function __construct(string $node, string $operation, array $needs, string $message, ?string $answer = null):Parameters
| Name | Type | Description |
|---|---|---|
| $node | string | the state whose node did not run |
| $operation | string | the operation bound to it |
| $needs | list<string> | what the node declared: its scopes, or its one permission |
| $message | string | |
| $answer | (string | null) | the gate answer that was not taken because it leads here, when that is the case |
NodeRefused::at()
public static function at(string $state, Milpa\Command\Operation $node, string $why): selfThe node the run is standing on was about to run, and did not. The run stays parked there.
Parameters
| Name | Type | Description |
|---|---|---|
| $state | string | |
| $node | Milpa\Command\Operation | |
| $why | string | the fragment {@see Caller::refusalOf()} gave — «it needs …» |
NodeRefused::ahead()
public static function ahead(string $decision, string $state, Milpa\Command\Operation $node, string $why): selfAn answer to a gate leads straight to a node this caller may not run, so the answer is not taken.
Parameters
| Name | Type | Description |
|---|---|---|
| $decision | string | |
| $state | string | |
| $node | Milpa\Command\Operation | |
| $why | string | the fragment {@see Caller::refusalOf()} gave — «it needs …» |
NodeRefused::leadsTo()
public static function leadsTo(string $state, Milpa\Command\Operation $node, string $why): stringWhy an option that leads to `$state` cannot be taken by a caller who may not run its node — the same words whether it is said BEFORE anybody answers ({@see GraphRuns::pending()}) or when an answer is refused.
Parameters
| Name | Type | Description |
|---|---|---|
| $state | string | |
| $node | Milpa\Command\Operation | |
| $why | string | the fragment {@see Caller::refusalOf()} gave — «it needs …» |
NodeRefused::needsOf()
public static function needsOf(Milpa\Command\Operation $node): arrayWhat a node declared it needs: its scopes, or its one permission.
Parameters
| Name | Type | Description |
|---|---|---|
| $node | Milpa\Command\Operation |