/** * {@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)); }
/** * Compute current execution depth. * * @return number */ public function getExecutionDepth() { return $this->parentExecution === NULL ? 0 : $this->parentExecution->getExecutionDepth() + 1; }