修复: execution_id String→ExecutionId 类型别名 + 更新待决策状态
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::types::NodeId;
|
||||
use crate::types::{ExecutionId, NodeId};
|
||||
|
||||
/// 人工审批选择类型(F-260615-01)
|
||||
/// - Single: 单选(decision 单值),缺省值,向后兼容现有调用方
|
||||
@@ -24,7 +24,7 @@ pub enum SelectType {
|
||||
/// 旧调用方仍可只填 decision,HumanNode 下游兼容两者。
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct HumanApprovalResponse {
|
||||
pub execution_id: String,
|
||||
pub execution_id: ExecutionId,
|
||||
pub node_id: NodeId,
|
||||
pub decision: String,
|
||||
#[serde(default)]
|
||||
@@ -81,7 +81,7 @@ pub enum WorkflowEvent {
|
||||
/// #[serde(default)] 向后兼容: 老事件/老 DB 反序列化(无 execution_id)填空串不炸。
|
||||
WorkflowCompleted {
|
||||
#[serde(default)]
|
||||
execution_id: String,
|
||||
execution_id: ExecutionId,
|
||||
total_duration_ms: u64,
|
||||
},
|
||||
/// 工作流执行失败
|
||||
@@ -89,13 +89,13 @@ pub enum WorkflowEvent {
|
||||
/// B-03b-R10 ③(波17 治本): execution_id 字段标识本次终态事件归属的工作流执行(同 WorkflowCompleted)。
|
||||
WorkflowFailed {
|
||||
#[serde(default)]
|
||||
execution_id: String,
|
||||
execution_id: ExecutionId,
|
||||
error: String,
|
||||
failed_node: NodeId,
|
||||
},
|
||||
/// 人工审批请求
|
||||
HumanApprovalRequest {
|
||||
execution_id: String,
|
||||
execution_id: ExecutionId,
|
||||
node_id: NodeId,
|
||||
title: String,
|
||||
description: String,
|
||||
@@ -106,7 +106,7 @@ pub enum WorkflowEvent {
|
||||
},
|
||||
/// 人工审批响应
|
||||
HumanApprovalResponse {
|
||||
execution_id: String,
|
||||
execution_id: ExecutionId,
|
||||
node_id: NodeId,
|
||||
decision: String,
|
||||
/// F-260615-01: 多选结果(Single 模式长度=1,Multiple 模式长度≥1)
|
||||
|
||||
Reference in New Issue
Block a user