fix(executions): Flow triggered twice when there are two multiple conditions

Fixes #12560
This commit is contained in:
Loïc Mathieu
2025-10-31 16:26:22 +01:00
parent 0313e8e49b
commit c5ef356a1c

View File

@@ -1204,6 +1204,7 @@ public class JdbcExecutor implements ExecutorInterface {
flowTriggerService.withFlowTriggersOnly(allFlows.stream())
.filter(f -> ListUtils.emptyOnNull(f.getTrigger().getConditions()).stream().anyMatch(c -> c instanceof MultipleCondition) || f.getTrigger().getPreconditions() != null)
.map(f -> new MultipleConditionEvent(f.getFlow(), execution))
.distinct() // we can have multiple MultipleConditionEvent if a flow contains multiple triggers as it would lead to multiple FlowWithFlowTrigger
.forEach(throwConsumer(multipleCondition -> multipleConditionEventQueue.emit(multipleCondition)));
}