registry = $registry; } public function run(StepRunArgs $args): void { $action = $this->registry->getAction($args->getStep()->getKey()); if (!$action) { throw new InvalidStateException(); } if (!$action->isValid($args->getWorkflowRun()->getSubjects(), $args->getStep(), $args->getWorkflow())) { throw new InvalidStateException(); } $action->run($args); } }