Allow custom validation for all step types

[MAILPOET-4659]
This commit is contained in:
Jan Jakes
2022-10-04 15:25:43 +02:00
committed by Jan Jakeš
parent 9d8cb02006
commit a052cdcceb
6 changed files with 18 additions and 9 deletions

View File

@ -44,12 +44,9 @@ class ValidStepValidationRule implements WorkflowNodeVisitor {
}
try {
if ($registryStep instanceof Action) {
$subjects = $this->collectSubjects($workflow, $node->getParents());
$args = new StepValidationArgs($workflow, $step, $subjects);
$registryStep->validate($args);
}
$subjects = $this->collectSubjects($workflow, $node->getParents());
$args = new StepValidationArgs($workflow, $step, $subjects);
$registryStep->validate($args);
} catch (Throwable $e) {
$this->errors[$step->getId()] = [
'step_id' => $step->getId(),