Add futurePersonSignatures property to WorkflowTransitionContextDTO

A new property named futurePersonSignatures has been added to the WorkflowTransitionContextDTO class. This will hold a list of Person objects expected to sign the next step, improving the scope of information available within the workflow context.
This commit is contained in:
Julien Fastré 2024-07-09 23:36:39 +02:00
parent 7f3de62b2c
commit b5af9f7b63
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 9 additions and 0 deletions

View File

@ -437,6 +437,10 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
$newStep->addDestEmail($email);
}
foreach ($transitionContextDTO->futurePersonSignatures as $personSignature) {
new EntityWorkflowStepSignature($newStep, $personSignature);
}
// copy the freeze
if ($this->isFreeze()) {
$newStep->setFreezeAfter(true);

View File

@ -51,6 +51,11 @@ class WorkflowTransitionContextDTO
*/
public array $futureDestEmails = [];
/**
* a list of future @see{Person} with will sign the next step.
*/
public array $futurePersonSignatures = [];
public ?Transition $transition = null;
public string $comment = '';