bpm-engine-storage 0.2.0

Storage traits and types for the BPM engine (process, token, timer, history)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

#[derive(Debug, Clone)]
pub struct CompensationRecordRow {
    pub id: String,
    pub instance_id: String,
    pub node_id: String,
    pub handler_ref: String,
    pub order: u32,
    pub status: String,
    pub created_at: String,
}

#[async_trait]
pub trait CompensationRecordRepo: Send + Sync {
    async fn add(&self, record: &CompensationRecordRow) -> anyhow::Result<()>;
    async fn list_by_instance(&self, instance_id: &str) -> Vec<CompensationRecordRow>;
}