protected function delegateSignal(VirtualExecution $execution, ?string $signal, array $variables, array $delegation): bool
    {
        if (empty($delegation['nodeId'])) {
            return false;
        }
        
        $node = $execution->getProcessModel()->findNode($delegation['nodeId']);
        
        $execution->getEngine()->debug('Delegating signal <{signal}> to {node}', [
            'signal' => ($signal === null) ? 'null' : $signal,
            'node' => (string) $node
        ]);
        
        $execution->setNode($node);
        $execution->waitForSignal();
        
        $execution->signal($signal, $variables);
        
        return true;
    }