refactor(workflow): Rename workflow node execution models (#20458)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
32e779eef3
commit
f7fb10635f
14 changed files with 88 additions and 87 deletions
|
|
@ -13,7 +13,7 @@ from core.app.apps.workflow.app_config_manager import WorkflowAppConfigManager
|
|||
from core.repositories import SQLAlchemyWorkflowNodeExecutionRepository
|
||||
from core.variables import Variable
|
||||
from core.workflow.entities.node_entities import NodeRunResult
|
||||
from core.workflow.entities.workflow_node_execution import NodeExecution, WorkflowNodeExecutionStatus
|
||||
from core.workflow.entities.workflow_node_execution import WorkflowNodeExecution, WorkflowNodeExecutionStatus
|
||||
from core.workflow.errors import WorkflowNodeRunFailedError
|
||||
from core.workflow.graph_engine.entities.event import InNodeEvent
|
||||
from core.workflow.nodes import NodeType
|
||||
|
|
@ -30,7 +30,7 @@ from models.model import App, AppMode
|
|||
from models.tools import WorkflowToolProvider
|
||||
from models.workflow import (
|
||||
Workflow,
|
||||
WorkflowNodeExecution,
|
||||
WorkflowNodeExecutionModel,
|
||||
WorkflowNodeExecutionTriggeredFrom,
|
||||
WorkflowType,
|
||||
)
|
||||
|
|
@ -254,7 +254,7 @@ class WorkflowService:
|
|||
|
||||
def run_draft_workflow_node(
|
||||
self, app_model: App, node_id: str, user_inputs: dict, account: Account
|
||||
) -> WorkflowNodeExecution:
|
||||
) -> WorkflowNodeExecutionModel:
|
||||
"""
|
||||
Run draft workflow node
|
||||
"""
|
||||
|
|
@ -296,7 +296,7 @@ class WorkflowService:
|
|||
|
||||
def run_free_workflow_node(
|
||||
self, node_data: dict, tenant_id: str, user_id: str, node_id: str, user_inputs: dict[str, Any]
|
||||
) -> NodeExecution:
|
||||
) -> WorkflowNodeExecution:
|
||||
"""
|
||||
Run draft workflow node
|
||||
"""
|
||||
|
|
@ -322,7 +322,7 @@ class WorkflowService:
|
|||
invoke_node_fn: Callable[[], tuple[BaseNode, Generator[NodeEvent | InNodeEvent, None, None]]],
|
||||
start_at: float,
|
||||
node_id: str,
|
||||
) -> NodeExecution:
|
||||
) -> WorkflowNodeExecution:
|
||||
try:
|
||||
node_instance, generator = invoke_node_fn()
|
||||
|
||||
|
|
@ -374,7 +374,7 @@ class WorkflowService:
|
|||
error = e.error
|
||||
|
||||
# Create a NodeExecution domain model
|
||||
node_execution = NodeExecution(
|
||||
node_execution = WorkflowNodeExecution(
|
||||
id=str(uuid4()),
|
||||
workflow_id="", # This is a single-step execution, so no workflow ID
|
||||
index=1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue