/** * Propagates the new state machine position to the execution context of the given subject, * by calling the execution context's "onStateExit" method. * * @param StatefulSubjectInterface $subject */ public function onExit(StatefulSubjectInterface $subject) { parent::onExit($subject); foreach ($this->getOption(self::OPTION_REMOVE_VARS, []) as $key) { $subject->getExecutionContext()->removeParameter($key); } }