修复: execution_id String→ExecutionId 类型别名 + 更新待决策状态

This commit is contained in:
2026-06-28 03:50:25 +08:00
parent 8723075360
commit 7e3fe1961a
5 changed files with 20 additions and 20 deletions

View File

@@ -3,7 +3,7 @@
use std::collections::HashMap;
use df_types::events::WorkflowEvent;
use df_types::types::NodeId;
use df_types::types::{ExecutionId, NodeId};
use crate::conditions::ConditionEngine;
use crate::dag::Dag;
@@ -18,7 +18,7 @@ pub struct DagExecutor {
/// 节点状态机
state_machine: StateMachine,
/// 工作流执行 ID由调用方传入下沉到每个 NodeContext
execution_id: String,
execution_id: ExecutionId,
}
impl DagExecutor {
@@ -26,7 +26,7 @@ impl DagExecutor {
///
/// `execution_id` 为本次工作流执行的唯一标识,会下沉到每个节点的 NodeContext
/// 用于节点内的事件关联、审计追踪等。
pub fn new(event_bus: EventBus, execution_id: String) -> Self {
pub fn new(event_bus: EventBus, execution_id: ExecutionId) -> Self {
Self {
event_bus,
state_machine: StateMachine::new(),

View File

@@ -3,7 +3,7 @@
use async_trait::async_trait;
use serde::{Deserialize, Serialize};
use df_types::types::NodeId;
use df_types::types::{ExecutionId, NodeId};
use super::eventbus::EventBus;
use super::state::StateMachine;
@@ -18,7 +18,7 @@ pub struct NodeContext {
/// 节点配置参数
pub config: serde_json::Value,
/// 工作流执行 ID
pub execution_id: String,
pub execution_id: ExecutionId,
/// 事件总线
pub event_bus: EventBus,
/// 节点状态机(用于检查取消状态)