use async_trait::async_trait;
use bpm_engine_core::{ProcessDefinition, ProcessInstance};
#[async_trait]
pub trait ProcessInstanceStore: Send + Sync {
async fn load(&self, id: &str) -> anyhow::Result<Option<ProcessInstance>>;
async fn save(&self, instance: &ProcessInstance) -> anyhow::Result<()>;
async fn list_running(&self, tenant_id: Option<&str>) -> anyhow::Result<Vec<String>>;
}
#[async_trait]
pub trait ProcessDefinitionStore: Send + Sync {
async fn load(&self, id: &str) -> anyhow::Result<Option<ProcessDefinition>>;
}