fix: Support UI-format edge routing with sourceHandle
Logic-Nodes evaluated correctly but activated_edges was empty because _get_edges_by_label() only checked e.label, which is null in UI format. UI format uses: - sourceHandle: "true" / "false" (instead of label: "then" / "else") - targetHandle: "in" / "path_1" / etc. Changes: 1. Added source_handle/target_handle fields to WorkflowEdge model - With aliases sourceHandle/targetHandle for camelCase JSON 2. Updated _get_edges_by_label() to check both formats: - Legacy: e.label == "then" / "else" - UI: e.source_handle == "true" / "false" Now Logic-Nodes correctly activate outgoing edges → Join-Node receives completed paths → End-Node executes → Workflow completes! Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba04e0c0b6
commit
057df0afc8
2 files changed
+20
-2
No files matched your search
@@ -230,6 +230,10 @@ class WorkflowEdge(BaseModel):
|
||||
to_node: str = Field(..., alias="to", description="Ziel-Knoten-ID")
|
||||
label: Optional[str] = Field(None, description="Label für visuelle Darstellung (z.B. 'then', 'else')")
|
||||
|
||||
# UI-Format fields (React Flow)
|
||||
source_handle: Optional[str] = Field(None, alias="sourceHandle", description="Source handle ID (UI format: 'true', 'false', 'out')")
|
||||
target_handle: Optional[str] = Field(None, alias="targetHandle", description="Target handle ID (UI format: 'in', 'path_1', etc.)")
|
||||
|
||||
|
||||
class WorkflowGraph(BaseModel):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user