From b7c11c1818c9e710e09c5a7b742bc9b65fac2b5c Mon Sep 17 00:00:00 2001 From: Lazy_Frog <4590648+lazyFrogLOL@users.noreply.github.com> Date: Fri, 7 Feb 2025 13:56:08 +0800 Subject: [PATCH] Fix the problem of Workflow terminates after parallel tasks execution, merge node not triggered (#12498) Co-authored-by: Novice Lee --- api/core/workflow/graph_engine/entities/graph.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/core/workflow/graph_engine/entities/graph.py b/api/core/workflow/graph_engine/entities/graph.py index 5c672c985b..1c6b4b6618 100644 --- a/api/core/workflow/graph_engine/entities/graph.py +++ b/api/core/workflow/graph_engine/entities/graph.py @@ -590,6 +590,8 @@ class Graph(BaseModel): start_node_id=node_id, routes_node_ids=routes_node_ids, ) + # Exclude conditional branch nodes + and all(edge.run_condition is None for edge in reverse_edge_mapping.get(node_id, [])) ): if node_id not in merge_branch_node_ids: merge_branch_node_ids[node_id] = []