src/Command/StartProcessCommand.php
public function execute(EngineInterface $engine)
    {
        $engine->debug('Starting process {process} at {node}', [
            'process' => (string) $this->model->getId(),
            'node' => (string) $this->startNode
        ]);
        
        $process = $this->createRootExecution($engine);
        
        $engine->debug('Created {execution}', [
            'execution' => (string) $process
        ]);
        
        foreach ($this->variables as $k => $v) {
            $process->setVariable($k, $v);
        }
        
        $engine->registerExecution($process);
        
        $engine->notify(new StartProcessEvent($this->startNode, $process));
        
        $process->execute($this->startNode);
        
        return $process;
    }
public function execute(EngineInterface $engine)
    {
        $engine->debug('Starting process {process} at {node}', [
            'process' => (string) $this->model->getId(),
            'node' => (string) $this->startNode
        ]);
        
        $process = $this->createRootExecution($engine);
        
        $engine->debug('Created {execution}', [
            'execution' => (string) $process
        ]);
        
        foreach ($this->variables as $k => $v) {
            $process->setVariable($k, $v);
        }
        
        $engine->registerExecution($process);
        
        $engine->notify(new StartProcessEvent($this->startNode, $process));
        
        $process->execute($this->startNode);
        
        return $process;
    }
{@inheritdoc}