Exemplo n.º 1
0
 protected function findSubProcessStartNode($id, ProcessModel $subModel)
 {
     $startNode = NULL;
     foreach ($subModel->findStartNodes() as $candidate) {
         $behavior = $candidate->getBehavior();
         if ($behavior instanceof StartEventBehaviorInterface) {
             $startNode = $candidate;
             break;
         }
     }
     if ($startNode === NULL) {
         throw new \RuntimeException(sprintf('Missing start node of sub process %s', $id));
     }
     return $startNode;
 }