/** * Activate this node. * * @param ezcWorkflowExecution $execution * @param ezcWorkflowNode $activatedFrom * @param int $threadId * @ignore */ public function activate(ezcWorkflowExecution $execution, ezcWorkflowNode $activatedFrom = null, $threadId = 0) { $parentThreadId = $execution->getParentThreadId($threadId); if (empty($this->state['threads'])) { $this->state['threads'][] = $threadId; parent::activate($execution, $activatedFrom, $parentThreadId); } }
/** * Activate this node. * * @param ezcWorkflowExecution $execution * @param ezcWorkflowNode $activatedFrom * @param int $threadId * @ignore */ public function activate(ezcWorkflowExecution $execution, ezcWorkflowNode $activatedFrom = null, $threadId = 0) { $this->prepareActivate($execution, $threadId); $this->setThreadId($execution->getParentThreadId($threadId)); $numActivated = count($this->state['threads']); if ($numActivated == 1) { $this->activateNode($execution, $this->outNodes[0]); } else { if ($numActivated == $execution->getNumSiblingThreads($threadId)) { parent::activate($execution, $activatedFrom, $this->threadId); } } $execution->endThread($threadId); }
/** * Activate this node. * * @param ezcWorkflowExecution $execution * @param ezcWorkflowNode $activatedFrom * @param int $threadId * @ignore */ public function activate(ezcWorkflowExecution $execution, ezcWorkflowNode $activatedFrom = null, $threadId = 0) { $this->prepareActivate($execution, $threadId); parent::activate($execution, $activatedFrom, $execution->getParentThreadId($threadId)); }