src/Behavior/ExclusiveChoiceBehavior.php
public function execute(Execution $execution)
    {
        foreach ($execution->getProcessModel()->findOutgoingTransitions($execution->getNode()->getId()) as $trans) {
            if ($trans->getId() === $this->defaultTransition) {
                continue;
            }
            
            if ($trans->isEnabled($execution)) {
                return $execution->take($trans);
            }
        }
        
        if ($this->defaultTransition !== null) {
            return $execution->take($this->defaultTransition);
        }
        
        $message = sprintf('Execution %s about to get stuck in exclusive choice within node "%s"', $execution->getId(), $execution->getNode()->getId());
        
        throw new StuckException($message);
    }
public function execute(Execution $execution)
    {
        foreach ($execution->getProcessModel()->findOutgoingTransitions($execution->getNode()->getId()) as $trans) {
            if ($trans->getId() === $this->defaultTransition) {
                continue;
            }
            
            if ($trans->isEnabled($execution)) {
                return $execution->take($trans);
            }
        }
        
        if ($this->defaultTransition !== null) {
            return $execution->take($this->defaultTransition);
        }
        
        $message = sprintf('Execution %s about to get stuck in exclusive choice within node "%s"', $execution->getId(), $execution->getNode()->getId());
        
        throw new StuckException($message);
    }
{@inheritdoc}