Skip to content
docsv0.17.1

ResumeGraph

Carries on a run that parked because its caller could not run the next node. A node that declares a need does not run for a caller who lacks it, and the run parks AT that node: no gate is waiting, so there is nothing to answer, and until this operation nothing moved it. Resuming is one more invocation that reaches the node — so THE NODE RUNS AS WHOEVER RESUMES, and only if this caller holds what it declares. A caller who may not run it either is refused the same way, and the run stays where it was. It asks for `graph:run`, like the start: it runs nodes and DECIDES NOTHING. It takes which run and nothing else — no answer, no inputs — and it refuses a run that is waiting for a decision, which is `graph:decide`'s to answer. Whoever started the run is still the one its gates record, so resuming one's own run is no way to approve it (greenhouse decisions/0582).

ResumeGraph::__construct()

public function __construct(string $graph, string $instance):

Parameters

Parameters of __construct()
NameTypeDescription
$graphstring
$instancestring

ResumeGraph::run()

public function run(Milpa\Orchestrator\Declaration\GraphRuns $runs, ?Milpa\Command\InvocationContext $context = null): array

Resumes the run and reports where it came to rest. This is what a declared operation exposes, and a declared `run()` is never handed the caller's authority. So through here the caller holds nothing, and the node the run is parked at — which declares a need, or the run would not be parked — does not run. The door ({@see GraphOperations}) calls {@see self::runAs()} instead.

Parameters

Parameters of run()
NameTypeDescription
$runsMilpa\Orchestrator\Declaration\GraphRuns
$context?Milpa\Command\InvocationContext

ResumeGraph::runAs()

public function runAs(Milpa\Orchestrator\Declaration\GraphRuns $runs, Milpa\Orchestrator\Declaration\Caller $caller): array

Resumes the run as `$caller`: who is asking, and what the surface verified they hold.

Parameters

Parameters of runAs()
NameTypeDescription
$runsMilpa\Orchestrator\Declaration\GraphRuns
$callerMilpa\Orchestrator\Declaration\Caller