Skip to main content

bpm_engine_storage/
compensation.rs

1use async_trait::async_trait;
2
3#[derive(Debug, Clone)]
4pub struct CompensationRecordRow {
5    pub id: String,
6    pub instance_id: String,
7    pub node_id: String,
8    pub handler_ref: String,
9    pub order: u32,
10    pub status: String,
11    pub created_at: String,
12}
13
14#[async_trait]
15pub trait CompensationRecordRepo: Send + Sync {
16    async fn add(&self, record: &CompensationRecordRow) -> anyhow::Result<()>;
17    async fn list_by_instance(&self, instance_id: &str) -> Vec<CompensationRecordRow>;
18}