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