pub struct ExtendedWorkflowEngine { /* private fields */ }
Expand description
Extended workflow engine - builds on core workflow functionality
Implementations§
Source§impl ExtendedWorkflowEngine
impl ExtendedWorkflowEngine
pub fn builder() -> WorkflowEngineBuilder
Sourcepub fn activity_registry(&self) -> &Arc<ActivityRegistry>
pub fn activity_registry(&self) -> &Arc<ActivityRegistry>
Get activity registry for registering activities
Sourcepub async fn start_workflow(
&mut self,
workflow_ir: &WorkflowIR,
inputs: HashMap<String, Value>,
) -> Result<WorkflowExecutionId, WorkflowError>
pub async fn start_workflow( &mut self, workflow_ir: &WorkflowIR, inputs: HashMap<String, Value>, ) -> Result<WorkflowExecutionId, WorkflowError>
Start workflow execution
Sourcepub async fn wait_for_completion(
&self,
execution_id: WorkflowExecutionId,
timeout: Option<Duration>,
) -> Result<WorkflowResult, WorkflowError>
pub async fn wait_for_completion( &self, execution_id: WorkflowExecutionId, timeout: Option<Duration>, ) -> Result<WorkflowResult, WorkflowError>
Wait for workflow completion
Sourcepub async fn get_execution_status(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<ExecutionStatus>, WorkflowError>
pub async fn get_execution_status( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<ExecutionStatus>, WorkflowError>
Get workflow execution status
Sourcepub async fn get_execution(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<WorkflowExecution>, WorkflowError>
pub async fn get_execution( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<WorkflowExecution>, WorkflowError>
Get workflow execution details
Sourcepub async fn list_running_executions(
&self,
) -> Result<Vec<WorkflowExecution>, WorkflowError>
pub async fn list_running_executions( &self, ) -> Result<Vec<WorkflowExecution>, WorkflowError>
List running executions
Sourcepub async fn cancel_execution(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<(), WorkflowError>
pub async fn cancel_execution( &self, execution_id: &WorkflowExecutionId, ) -> Result<(), WorkflowError>
Cancel workflow execution
Sourcepub async fn get_execution_at_tx(
&self,
execution_id: &WorkflowExecutionId,
tx_id: TxId,
) -> Option<WorkflowExecution>
pub async fn get_execution_at_tx( &self, execution_id: &WorkflowExecutionId, tx_id: TxId, ) -> Option<WorkflowExecution>
Phase 2: Get workflow execution at specific transaction
Sourcepub async fn get_execution_history(
&self,
execution_id: &WorkflowExecutionId,
) -> Vec<(TxId, WorkflowExecution)>
pub async fn get_execution_history( &self, execution_id: &WorkflowExecutionId, ) -> Vec<(TxId, WorkflowExecution)>
Phase 2: Get execution history (all versions)
Sourcepub async fn get_event_history(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Vec<ExecutionEvent>, WorkflowError>
pub async fn get_event_history( &self, execution_id: &WorkflowExecutionId, ) -> Result<Vec<ExecutionEvent>, WorkflowError>
Phase 2: Get full event history
Sourcepub async fn rebuild_execution_from_events(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<WorkflowExecution>, WorkflowError>
pub async fn rebuild_execution_from_events( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<WorkflowExecution>, WorkflowError>
Phase 2: Rebuild execution from events (for recovery)
Sourcepub async fn create_snapshot(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<(), WorkflowError>
pub async fn create_snapshot( &self, execution_id: &WorkflowExecutionId, ) -> Result<(), WorkflowError>
Phase 2: Create manual snapshot
Sourcepub async fn restore_from_snapshot(
&self,
execution_id: &WorkflowExecutionId,
) -> Result<Option<WorkflowExecution>, WorkflowError>
pub async fn restore_from_snapshot( &self, execution_id: &WorkflowExecutionId, ) -> Result<Option<WorkflowExecution>, WorkflowError>
Phase 2: Restore from snapshot
Sourcepub async fn get_performance_stats(&self) -> HashMap<String, usize>
pub async fn get_performance_stats(&self) -> HashMap<String, usize>
Phase 2: Get performance statistics
Sourcepub fn event_sourcing(&self) -> &Arc<EventSourcingManager>
pub fn event_sourcing(&self) -> &Arc<EventSourcingManager>
Phase 2: Access event sourcing manager
Sourcepub fn snapshot_manager(&self) -> &Arc<SnapshotManager>
pub fn snapshot_manager(&self) -> &Arc<SnapshotManager>
Phase 2: Access snapshot manager
Sourcepub fn enable_distributed_execution(
&mut self,
local_node_id: String,
load_balancer: Arc<dyn LoadBalancer>,
)
pub fn enable_distributed_execution( &mut self, local_node_id: String, load_balancer: Arc<dyn LoadBalancer>, )
Phase 2: Enable distributed execution
Sourcepub async fn submit_distributed_workflow(
&self,
execution_id: WorkflowExecutionId,
) -> Result<String, WorkflowError>
pub async fn submit_distributed_workflow( &self, execution_id: WorkflowExecutionId, ) -> Result<String, WorkflowError>
Phase 2: Submit workflow for distributed execution
Sourcepub async fn get_cluster_health(&self) -> Result<ClusterHealth, WorkflowError>
pub async fn get_cluster_health(&self) -> Result<ClusterHealth, WorkflowError>
Phase 2: Get cluster health
Sourcepub fn distributed_execution_manager(
&self,
) -> Option<&Arc<DistributedExecutionManager>>
pub fn distributed_execution_manager( &self, ) -> Option<&Arc<DistributedExecutionManager>>
Phase 2: Get distributed execution manager
Sourcepub fn is_distributed_enabled(&self) -> bool
pub fn is_distributed_enabled(&self) -> bool
Phase 2: Check if distributed execution is enabled