From e5a4d11cf966a73b2b6d25a087175aed97e12b06 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 17 Feb 2025 15:08:24 +0800 Subject: [PATCH] fix workflow --- app/chain/workflow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/chain/workflow.py b/app/chain/workflow.py index b2326917..f90c43d5 100644 --- a/app/chain/workflow.py +++ b/app/chain/workflow.py @@ -4,7 +4,7 @@ from app.chain import ChainBase from app.core.workflow import WorkFlowManager from app.db.workflow_oper import WorkflowOper from app.log import logger -from app.schemas import Workflow, ActionContext +from app.schemas import Workflow, ActionContext, Action class WorkflowChain(ChainBase): @@ -32,7 +32,8 @@ class WorkflowChain(ChainBase): # 启用上下文 context = ActionContext() self.workflowoper.start(workflow_id) - for action in workflow.actions: + for act in workflow.actions: + action = Action(**act) state, context = self.workflowmanager.excute(action, context) self.workflowoper.step(workflow_id, action=action.name, context=context.dict()) if not state: