pub struct WorkflowEngine { /* private fields */ }Expand description
Manages workflow execution and scheduling
Implementations§
Source§impl WorkflowEngine
impl WorkflowEngine
Sourcepub fn start_workflow(&mut self, workflow_name: Option<String>) -> String
pub fn start_workflow(&mut self, workflow_name: Option<String>) -> String
Start a new workflow
Sourcepub fn activate_agenda_group(&mut self, group: String)
pub fn activate_agenda_group(&mut self, group: String)
Activate an agenda group for workflow progression
Sourcepub fn schedule_rule(
&mut self,
rule_name: String,
delay_ms: u64,
workflow_id: Option<String>,
)
pub fn schedule_rule( &mut self, rule_name: String, delay_ms: u64, workflow_id: Option<String>, )
Schedule a rule to execute after a delay
Sourcepub fn complete_workflow(&mut self, workflow_name: String)
pub fn complete_workflow(&mut self, workflow_name: String)
Complete a workflow
Sourcepub fn set_workflow_data(
&mut self,
workflow_id: &str,
key: String,
value: Value,
)
pub fn set_workflow_data( &mut self, workflow_id: &str, key: String, value: Value, )
Set workflow data
Sourcepub fn get_next_agenda_group(&mut self) -> Option<String>
pub fn get_next_agenda_group(&mut self) -> Option<String>
Get the next agenda group to activate
Sourcepub fn get_ready_tasks(&mut self) -> Vec<ScheduledTask>
pub fn get_ready_tasks(&mut self) -> Vec<ScheduledTask>
Get ready scheduled tasks
Sourcepub fn get_next_pending_agenda_activation(&mut self) -> Option<String>
pub fn get_next_pending_agenda_activation(&mut self) -> Option<String>
Get the next pending agenda activation (for syncing with agenda manager)
Sourcepub fn get_workflow(&self, workflow_id: &str) -> Option<&WorkflowState>
pub fn get_workflow(&self, workflow_id: &str) -> Option<&WorkflowState>
Get workflow state by ID
Sourcepub fn get_active_workflows(&self) -> Vec<&WorkflowState>
pub fn get_active_workflows(&self) -> Vec<&WorkflowState>
Get all active workflows
Sourcepub fn get_workflow_stats(&self) -> WorkflowStats
pub fn get_workflow_stats(&self) -> WorkflowStats
Get workflow statistics
Sourcepub fn cleanup_completed_workflows(&mut self, older_than: Duration)
pub fn cleanup_completed_workflows(&mut self, older_than: Duration)
Clean up completed workflows older than specified duration
Trait Implementations§
Source§impl Debug for WorkflowEngine
impl Debug for WorkflowEngine
Auto Trait Implementations§
impl Freeze for WorkflowEngine
impl RefUnwindSafe for WorkflowEngine
impl Send for WorkflowEngine
impl Sync for WorkflowEngine
impl Unpin 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