From 4ce6fede67f6251a8260aadd87d60532e61825d9 Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 10 Apr 2026 14:08:51 +0800 Subject: [PATCH 1/2] fix(workflow): update cycle graph node output type validation --- api/app/core/workflow/nodes/cycle_graph/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/core/workflow/nodes/cycle_graph/node.py b/api/app/core/workflow/nodes/cycle_graph/node.py index fc80939f..68c83025 100644 --- a/api/app/core/workflow/nodes/cycle_graph/node.py +++ b/api/app/core/workflow/nodes/cycle_graph/node.py @@ -55,9 +55,9 @@ class CycleGraphNode(BaseNode): if config.output_type in [ VariableType.ARRAY_FILE, VariableType.ARRAY_STRING, - VariableType.NUMBER, + VariableType.ARRAY_NUMBER, VariableType.ARRAY_OBJECT, - VariableType.BOOLEAN + VariableType.ARRAY_BOOLEAN ]: if config.flatten: outputs['output'] = config.output_type From 068e2bfb7e0f266103d9698218e7e05d84e41771 Mon Sep 17 00:00:00 2001 From: Timebomb2018 <18868801967@163.com> Date: Fri, 10 Apr 2026 15:24:18 +0800 Subject: [PATCH 2/2] fix(workflow): update output pattern to handle standalone curly braces --- api/app/core/workflow/engine/graph_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/core/workflow/engine/graph_builder.py b/api/app/core/workflow/engine/graph_builder.py index daef6e82..4f76d694 100644 --- a/api/app/core/workflow/engine/graph_builder.py +++ b/api/app/core/workflow/engine/graph_builder.py @@ -31,7 +31,7 @@ logger = logging.getLogger(__name__) # Example: # "Hello {{user.name}}!" -> # ["Hello ", "{{user.name}}", "!"] -_OUTPUT_PATTERN = re.compile(r'\{\{.*?}}|[^{}]+') +_OUTPUT_PATTERN = re.compile(r'\{\{.*?}}|[^{]+|{') # Strict variable format: {{ node_id.field_name }} _VARIABLE_PATTERN = re.compile(r'\{\{\s*[a-zA-Z0-9_]+\.[a-zA-Z0-9_]+\s*}}')