From c5ef356a1c9336e1963d66aa6cd79dc95402b424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mathieu?= Date: Fri, 31 Oct 2025 16:26:22 +0100 Subject: [PATCH] fix(executions): Flow triggered twice when there are two multiple conditions Fixes #12560 --- jdbc/src/main/java/io/kestra/jdbc/runner/JdbcExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdbc/src/main/java/io/kestra/jdbc/runner/JdbcExecutor.java b/jdbc/src/main/java/io/kestra/jdbc/runner/JdbcExecutor.java index 68ccd5f19f..4b5ddecfc6 100644 --- a/jdbc/src/main/java/io/kestra/jdbc/runner/JdbcExecutor.java +++ b/jdbc/src/main/java/io/kestra/jdbc/runner/JdbcExecutor.java @@ -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))); }