From 1384a6d0fdc1e43c9301796cbb586b1d45d2bb11 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Tue, 9 Apr 2024 16:53:34 +0800 Subject: [PATCH] fix: workflow run edge status (#3236) --- web/app/components/workflow/hooks/use-workflow-run.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/app/components/workflow/hooks/use-workflow-run.ts b/web/app/components/workflow/hooks/use-workflow-run.ts index 67fce538e..6f6b4e4ed 100644 --- a/web/app/components/workflow/hooks/use-workflow-run.ts +++ b/web/app/components/workflow/hooks/use-workflow-run.ts @@ -176,6 +176,8 @@ export const useWorkflowRun = () => { const { getNodes, setNodes, + edges, + setEdges, } = store.getState() setWorkflowRunningData(produce(workflowRunningData!, (draft) => { draft.task_id = task_id @@ -192,6 +194,15 @@ export const useWorkflowRun = () => { }) }) setNodes(newNodes) + const newEdges = produce(edges, (draft) => { + draft.forEach((edge) => { + edge.data = { + ...edge.data, + _runned: false, + } + }) + }) + setEdges(newEdges) if (onWorkflowStarted) onWorkflowStarted(params)