PendingDecision
A gate that {@see HumanGate::openFor()} has opened (or {@see HumanGate::pendingFor()} has found already open) and is now awaiting a human decision on. `$options` is the gate's transition names; the constructor enforces they equal `$artifact->options()` 1:1 (order-insensitive) — the artifact<->gate invariant every {@see DecisionSurfaceInterface} this package builds a `PendingDecision` around must satisfy, so a stale or mismatched artifact fails loudly at construction rather than silently offering options the gate does not actually have.
PendingDecision::__construct()
public function __construct(string $instanceId, string $gateId, string $assignee, Milpa\Orchestrator\DecisionSurfaceInterface $artifact, array $options):Parameters
| Name | Type | Description |
|---|---|---|
| $instanceId | string | the process instance this decision belongs to |
| $gateId | string | the opened gate's code (e.g. `review_gate_gate`) |
| $assignee | string | the role expected to resolve this gate (the gate's approver role) |
| $artifact | DecisionSurfaceInterface | the decision surface built for this gate |
| $options | list<string> | the transition names available to resolve this gate with |
Throws
\InvalidArgumentException when `$artifact->options()` does not equal `$options` 1:1
(order-insensitive) — the artifact<->gate invariant