sz-rust-workflow 1.4.0

SZ-Rust 工作流引擎 — 状态机/审批流/插件节点编排,含设计器 API 与可观测层
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2024-2026 SZ-Rust Team
//
use async_trait::async_trait;

use crate::error::WorkflowResult;
use crate::instance::HistoryEntry;

/// 历史持久化 Repository。
#[async_trait]
pub trait HistoryRepository: Send + Sync + 'static {
    /// 追加历史条目(只增不删)。
    async fn append(&self, entry: &HistoryEntry) -> WorkflowResult<()>;

    /// 列出实例完整历史。
    async fn list_by_instance(&self, instance_id: &str) -> WorkflowResult<Vec<HistoryEntry>>;
}