mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
Adjust test to work with actual workflow + minor fix of handler logic
This commit is contained in:
@@ -35,7 +35,7 @@ class CancelStaleWorkflowHandler
|
||||
|
||||
$workflow = $this->workflowRepository->find($workflowId);
|
||||
|
||||
if (in_array($workflow, $staleWorkflows, true)) {
|
||||
if (!in_array($workflow, $staleWorkflows, true)) {
|
||||
$this->logger->alert('Workflow has transitioned in the meantime.', [$workflowId]);
|
||||
return;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class CancelStaleWorkflowHandler
|
||||
}
|
||||
|
||||
if (!$transitionApplied) {
|
||||
$this->logger->error('No valid transition found for EntityWorkflow %d.', [$workflowId]);
|
||||
$this->logger->error('No valid transition found for EntityWorkflow.', [$workflowId]);
|
||||
throw new UnrecoverableMessageHandlingException(sprintf('No valid transition found for EntityWorkflow %d.', $workflowId));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user