Ejemplo n.º 1
0
 protected function collectExecutions(Execution $execution, Node $node = NULL)
 {
     $executions = [$execution];
     foreach ($execution->findChildExecutions($node) as $child) {
         foreach ($this->collectExecutions($child, $node) as $exec) {
             $executions[] = $exec;
         }
     }
     return $executions;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function syncRemovedExecution(Execution $execution)
 {
     foreach ($execution->findChildExecutions() as $child) {
         $this->syncRemovedExecution($child);
     }
     $this->conn->delete('#__bpmn_execution', ['id' => $execution->getId()]);
     $this->notify(new ExecutionTerminatedEvent($execution, $this));
     return parent::syncRemovedExecution($execution);
 }
Ejemplo n.º 3
0
 /**
  * Find all inactive concurrent executions (e.g. any execution runs "in parallel" to this execution).
  *
  * @param Node $node Optional filter, return only executions that have arrived at the given node.
  * @return array<Execution> All matching inactive concurrent executions.
  */
 public function findInactiveConcurrentExecutions(Node $node = NULL)
 {
     if ($this->parentExecution === NULL) {
         return [];
     }
     return array_filter($this->parentExecution->findChildExecutions($node), function (Execution $execution) {
         return $execution->isConcurrent() && !$execution->isActive();
     });
 }