mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-30 14:06:13 +00:00
Remove unnecessary workflow deletion logic when in the initial position
This commit is contained in:
parent
a38116cca4
commit
0b580658de
6
.changes/unreleased/Feature-20250626-143735.yaml
Normal file
6
.changes/unreleased/Feature-20250626-143735.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
kind: Feature
|
||||
body: Do not remove workflow which are automatically canceled after staling for more than 30 days
|
||||
time: 2025-06-26T14:37:35.267672192+02:00
|
||||
custom:
|
||||
Issue: ""
|
||||
SchemaChange: No schema change
|
@ -58,7 +58,6 @@ final readonly class CancelStaleWorkflowHandler
|
||||
$transitions = $workflowComponent->getEnabledTransitions($workflow);
|
||||
|
||||
$transitionApplied = false;
|
||||
$wasInInitialPosition = 'initial' === $workflow->getStep();
|
||||
|
||||
foreach ($transitions as $transition) {
|
||||
if ($this->willTransitionLeadToFinalNegative($transition, $metadataStore)) {
|
||||
@ -80,10 +79,6 @@ final readonly class CancelStaleWorkflowHandler
|
||||
throw new UnrecoverableMessageHandlingException(sprintf('No valid transition found for EntityWorkflow %d.', $workflowId));
|
||||
}
|
||||
|
||||
if ($wasInInitialPosition) {
|
||||
$this->em->remove($workflow);
|
||||
}
|
||||
|
||||
$this->em->flush();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user