/** * {@inheritdoc} */ public function execute(Execution $execution) { $execution->getEngine()->notify(new ActivityStartedEvent($this->activityId, $execution, $execution->getEngine())); $execution->getEngine()->info('ENTER: scope <{scope}> at level {level} using {execution}', ['scope' => $this->activityId, 'level' => $execution->getExecutionDepth(), 'execution' => (string) $execution]); $root = $execution->createNestedExecution($execution->getProcessModel(), $execution->getNode(), true); $root->waitForSignal(); $this->createEventSubscriptions($root, $this->activityId, $execution->getNode()); $this->enter($root->createExecution(false)); }
/** * {@inheritdoc} */ public function execute(Execution $execution) { $engine = $execution->getEngine(); $activityId = $execution->getNode()->getId(); $engine->notify(new ActivityStartedEvent($activityId, $execution, $engine)); parent::execute($execution); $engine->notify(new ActivityCompletedEvent($activityId, $execution, $engine)); }
public function signal(Execution $execution, $signal, array $variables = [], array $delegation = []) { $sub = $execution->getEngine()->findExecution($delegation['executionId']); if (!$sub instanceof Execution) { throw new \RuntimeException('Missing reference to nested execution'); } foreach ($this->outputs as $target => $source) { if ($sub->hasVariable($source)) { $execution->setVariable($target, $sub->getVariable($source)); } } $execution->takeAll(NULL, [$execution]); }
/** * {@inheritdoc} */ public function execute(Execution $execution) { $execution->getEngine()->notify(new ActivityStartedEvent($execution->getNode()->getId(), $execution, $execution->getEngine())); $this->createEventSubscriptions($execution, $execution->getNode()->getId()); $this->enter($execution); }
/** * Get the BPMN process engine instance. * * @return ProcessEngine */ public function getEngine() { return parent::getEngine(); }