Change default workflow status to draft

MAILPOET-4264
This commit is contained in:
John Oleksowicz
2022-06-06 10:45:45 -05:00
committed by Veljko V
parent 2bf59eab9a
commit 12b677ce5e
2 changed files with 1 additions and 6 deletions

View File

@ -34,7 +34,6 @@ class CreateWorkflowFromTemplateController {
throw UnexpectedValueException::create()->withMessage('Template not found.');
}
$workflow->setDraft();
$this->storage->createWorkflow($workflow);
return $workflow;
}

View File

@ -17,7 +17,7 @@ class Workflow {
private $name;
/** @var string */
private $status = self::STATUS_INACTIVE;
private $status = self::STATUS_DRAFT;
/** @var DateTimeImmutable */
private $createdAt;
@ -56,10 +56,6 @@ class Workflow {
return $this->status;
}
public function setDraft(): void {
$this->status = self::STATUS_DRAFT;
}
public function getCreatedAt(): DateTimeImmutable {
return $this->createdAt;
}