Do not enforce workflow content for non-active workflows
[MAILPOET-4757]
This commit is contained in:
@@ -25,6 +25,11 @@ class AtLeastOneTriggerRule implements WorkflowNodeVisitor {
|
||||
}
|
||||
|
||||
public function complete(Workflow $workflow): void {
|
||||
// run full step validation only for active workflows
|
||||
if ($workflow->getStatus() !== Workflow::STATUS_ACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->triggerFound) {
|
||||
return;
|
||||
}
|
||||
|
@@ -15,6 +15,11 @@ class TriggerNeedsToBeFollowedByActionRule implements WorkflowNodeVisitor {
|
||||
}
|
||||
|
||||
public function visitNode(Workflow $workflow, WorkflowNode $node): void {
|
||||
// run full step validation only for active workflows
|
||||
if ($workflow->getStatus() !== Workflow::STATUS_ACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
$step = $node->getStep();
|
||||
if ($step->getType() !== Step::TYPE_TRIGGER) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user