use crate::Step;
use anyhow::Result;
use flowbuilder_context::SharedContext;
pub struct FlowExecutor;
impl FlowExecutor {
pub fn new() -> Self {
Self
}
pub async fn execute_steps(
&self,
steps: Vec<Step>,
context: SharedContext,
) -> Result<()> {
for step in steps {
step(context.clone()).await?;
}
Ok(())
}
}
impl Default for FlowExecutor {
fn default() -> Self {
Self::new()
}
}