stasis/ports/outbound/runtime/workflow_engine.rs
1use async_trait::async_trait;
2use serde_json::Value;
3
4use crate::domain::errors::Result;
5
6#[derive(Clone, Debug)]
7pub struct WorkflowExecutionOutput {
8 pub run_id: String,
9 pub execution: Value,
10 pub final_state: Value,
11}
12
13#[async_trait]
14pub trait WorkflowEngine: Send + Sync {
15 async fn execute_grapheme_source(
16 &self,
17 source: &str,
18 state_current: Option<&Value>,
19 ) -> Result<WorkflowExecutionOutput>;
20}