public function leave(VirtualExecution $execution, ?array $transitions = null): void
    {
        $execution->getEngine()->notify(new ActivityCompletedEvent($execution->getNode()->getId(), $execution, $execution->getEngine()));
        
        $this->clearEventSubscriptions($execution, $execution->getNode()->getId());
        
        $execution->takeAll($transitions);
    }