src/Engine/AbstractScopeActivity.php
public function leaveConcurrent(VirtualExecution $execution, ?Node $node = null, ?array $transitions = null): VirtualExecution
    {
        $root = $execution->getScope();
        $parent = $root->getParentExecution();
        
        $exec = $parent->createExecution(true);
        $exec->setNode(($node === null) ? $execution->getNode() : $node);
        
        $root->setConcurrent(true);
        
        $this->createEventSubscriptions($root, $this->activityId, $execution->getProcessModel()->findNode($this->activityId));
        
        $exec->takeAll($transitions);
        
        return $exec;
    }
public function leaveConcurrent(VirtualExecution $execution, ?Node $node = null, ?array $transitions = null): VirtualExecution
    {
        $root = $execution->getScope();
        $parent = $root->getParentExecution();
        
        $exec = $parent->createExecution(true);
        $exec->setNode(($node === null) ? $execution->getNode() : $node);
        
        $root->setConcurrent(true);
        
        $this->createEventSubscriptions($root, $this->activityId, $execution->getProcessModel()->findNode($this->activityId));
        
        $exec->takeAll($transitions);
        
        return $exec;
    }
public function leaveConcurrent ( VirtualExecution $ execution , ? Node $ node = null , ? array $ transitions = null ) : VirtualExecution { $ root = $ execution -> getScope ( ) ; $ parent = $ root -> getParentExecution ( ) ; $ exec = $ parent -> createExecution ( true ) ; $ exec -> setNode ( ( $ node === null ) ? $ execution -> getNode ( ) : $ node ) ; $ root -> setConcurrent ( true ) ; $ this -> createEventSubscriptions ( $ root , $ this -> activityId , $ execution -> getProcessModel ( ) -> findNode ( $ this -> activityId ) ) ; $ exec -> takeAll ( $ transitions ) ; return $ exec ; }
Create a new execution concurrent to the given execution and have it take the given transitions.

If the given execution is concurrent this method will create a new child execution from the parent execution.
Otherwise a new concurrent root will be introduced as parent of the given execution.
Create a new execution concurrent to the given execution and have it take the given transitions .