Skip to content
docsv0.17.1

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

Parameters of __construct()
NameTypeDescription
$nodestringthe state whose node did not run
$operationstringthe operation bound to it
$needslist<string>what the node declared: its scopes, or its one permission
$messagestring
$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): self

The node the run is standing on was about to run, and did not. The run stays parked there.

Parameters

Parameters of at()
NameTypeDescription
$statestring
$nodeMilpa\Command\Operation
$whystringthe fragment {@see Caller::refusalOf()} gave — «it needs …»

NodeRefused::ahead()

public static function ahead(string $decision, string $state, Milpa\Command\Operation $node, string $why): self

An answer to a gate leads straight to a node this caller may not run, so the answer is not taken.

Parameters

Parameters of ahead()
NameTypeDescription
$decisionstring
$statestring
$nodeMilpa\Command\Operation
$whystringthe fragment {@see Caller::refusalOf()} gave — «it needs …»

NodeRefused::leadsTo()

public static function leadsTo(string $state, Milpa\Command\Operation $node, string $why): string

Why 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

Parameters of leadsTo()
NameTypeDescription
$statestring
$nodeMilpa\Command\Operation
$whystringthe fragment {@see Caller::refusalOf()} gave — «it needs …»

NodeRefused::needsOf()

public static function needsOf(Milpa\Command\Operation $node): array

What a node declared it needs: its scopes, or its one permission.

Parameters

Parameters of needsOf()
NameTypeDescription
$nodeMilpa\Command\Operation