src/Execution.php
public function signal($signal = null, array $variables = [], array $delegation = [])
    {
        if ($this->isTerminated()) {
            throw new \RuntimeException(sprintf('Cannot signal terminated %s', $this));
        }
        
        if (!$this->isWaiting()) {
            throw new \RuntimeException(sprintf('%s is not in a wait state', $this));
        }
        
        $this->engine->pushCommand($this->engine->createSignalExecutionCommand($this, $signal, $variables, $delegation));
    }
public function signal($signal = null, array $variables = [], array $delegation = [])
    {
        if ($this->isTerminated()) {
            throw new \RuntimeException(sprintf('Cannot signal terminated %s', $this));
        }
        
        if (!$this->isWaiting()) {
            throw new \RuntimeException(sprintf('%s is not in a wait state', $this));
        }
        
        $this->engine->pushCommand($this->engine->createSignalExecutionCommand($this, $signal, $variables, $delegation));
    }
Signal the execution in order to continue from a wait state.

@param string $signal The name of the signal or null when no such name exists.
@param array<string, mixed> $variables Signal data.
@param array<string, mixed> $delegation Signal delegation data.

@throws \RuntimeException When the execution is terminated or not within a wait state.