pub struct WorkflowEngine { /* private fields */ }Expand description
Workflow engine for orchestrating executions.
Implementations§
Source§impl WorkflowEngine
impl WorkflowEngine
Sourcepub fn register_workflow(&self, workflow: Workflow) -> Result<WorkflowId>
pub fn register_workflow(&self, workflow: Workflow) -> Result<WorkflowId>
Register a workflow definition.
Sourcepub fn register_template(&self, template: WorkflowTemplate) -> Result<()>
pub fn register_template(&self, template: WorkflowTemplate) -> Result<()>
Register a workflow template.
Sourcepub fn create_from_template(
&self,
template_name: &str,
parameters: HashMap<String, Value>,
) -> Result<Workflow>
pub fn create_from_template( &self, template_name: &str, parameters: HashMap<String, Value>, ) -> Result<Workflow>
Create workflow from template.
Sourcepub fn start_execution(&self, workflow_id: WorkflowId) -> Result<Uuid>
pub fn start_execution(&self, workflow_id: WorkflowId) -> Result<Uuid>
Start a workflow execution.
Sourcepub fn pause_execution(&self, execution_id: Uuid) -> Result<()>
pub fn pause_execution(&self, execution_id: Uuid) -> Result<()>
Pause a workflow execution.
Sourcepub fn resume_execution(&self, execution_id: Uuid) -> Result<()>
pub fn resume_execution(&self, execution_id: Uuid) -> Result<()>
Resume a paused workflow execution.
Sourcepub fn cancel_execution(&self, execution_id: Uuid) -> Result<()>
pub fn cancel_execution(&self, execution_id: Uuid) -> Result<()>
Cancel a workflow execution.
Sourcepub fn complete_step(&self, execution_id: Uuid, step_id: String) -> Result<()>
pub fn complete_step(&self, execution_id: Uuid, step_id: String) -> Result<()>
Complete a workflow step.
Sourcepub fn fail_step(
&self,
execution_id: Uuid,
step_id: String,
error: String,
) -> Result<()>
pub fn fail_step( &self, execution_id: Uuid, step_id: String, error: String, ) -> Result<()>
Fail a workflow step.
Sourcepub fn get_execution(&self, execution_id: Uuid) -> Option<WorkflowExecution>
pub fn get_execution(&self, execution_id: Uuid) -> Option<WorkflowExecution>
Get workflow execution status.
Sourcepub fn list_executions(&self, workflow_id: WorkflowId) -> Vec<WorkflowExecution>
pub fn list_executions(&self, workflow_id: WorkflowId) -> Vec<WorkflowExecution>
List all executions for a workflow.
Sourcepub fn list_running_executions(&self) -> Vec<WorkflowExecution>
pub fn list_running_executions(&self) -> Vec<WorkflowExecution>
List running executions.
Sourcepub fn get_stats(&self) -> WorkflowStats
pub fn get_stats(&self) -> WorkflowStats
Get workflow statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowEngine
impl !RefUnwindSafe for WorkflowEngine
impl Send for WorkflowEngine
impl Sync for WorkflowEngine
impl Unpin for WorkflowEngine
impl UnsafeUnpin for WorkflowEngine
impl !UnwindSafe for WorkflowEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more