Correctly complete automation run when there is an empty branch in if/else
[MAILPOET-6154]
This commit is contained in:
committed by
Aschepikov
parent
63c19d2508
commit
2e13570dd7
@ -150,6 +150,13 @@ class StepHandler {
|
|||||||
$step->validate($validationArgs);
|
$step->validate($validationArgs);
|
||||||
$step->run($args, $this->stepRunControllerFactory->createController($args));
|
$step->run($args, $this->stepRunControllerFactory->createController($args));
|
||||||
|
|
||||||
|
// check if run is not completed by now (e.g., one of if/else branches is empty)
|
||||||
|
$automationRun = $this->automationRunStorage->getAutomationRun($runId);
|
||||||
|
if ($automationRun && $automationRun->getStatus() !== AutomationRun::STATUS_RUNNING) {
|
||||||
|
$logger->logSuccess();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// schedule next step if not scheduled by action
|
// schedule next step if not scheduled by action
|
||||||
if (!$this->stepScheduler->hasScheduledStep($args)) {
|
if (!$this->stepScheduler->hasScheduledStep($args)) {
|
||||||
$this->stepScheduler->scheduleNextStep($args);
|
$this->stepScheduler->scheduleNextStep($args);
|
||||||
|
Reference in New Issue
Block a user