/** * {@inheritdoc} */ public function enter(VirtualExecution $execution) { $execution->getEngine()->debug('Reached terminate end event "{name}"', ['name' => $this->getStringValue($this->name, $execution->getExpressionContext())]); $engine = $execution->getEngine(); $engine->notify(new ActivityCompletedEvent($execution->getNode()->getId(), $execution, $engine)); $root = $execution->getScopeRoot(); $root->setNode($execution->getNode()); $root->setTransition($execution->getTransition()); $root->terminate(false); }