pub struct WorkflowManager { /* private fields */ }Expand description
Workflow manager for complex task orchestration
Implementations§
Source§impl WorkflowManager
impl WorkflowManager
Sourcepub fn new(scheduler: TaskScheduler) -> Self
pub fn new(scheduler: TaskScheduler) -> Self
Create a new workflow manager
Sourcepub fn register_workflow(&self, workflow: Workflow) -> SklResult<()>
pub fn register_workflow(&self, workflow: Workflow) -> SklResult<()>
Register a workflow definition
Sourcepub fn start_workflow(
&self,
workflow_id: &str,
context: HashMap<String, String>,
) -> SklResult<String>
pub fn start_workflow( &self, workflow_id: &str, context: HashMap<String, String>, ) -> SklResult<String>
Start a workflow instance
Sourcepub fn get_workflow_status(&self, instance_id: &str) -> Option<WorkflowInstance>
pub fn get_workflow_status(&self, instance_id: &str) -> Option<WorkflowInstance>
Get workflow instance status
Sourcepub fn cancel_workflow(&self, instance_id: &str) -> SklResult<()>
pub fn cancel_workflow(&self, instance_id: &str) -> SklResult<()>
Cancel a workflow instance
Sourcepub fn list_workflow_instances(&self) -> HashMap<String, WorkflowInstance>
pub fn list_workflow_instances(&self) -> HashMap<String, WorkflowInstance>
List all workflow instances
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowManager
impl !RefUnwindSafe for WorkflowManager
impl Send for WorkflowManager
impl Sync for WorkflowManager
impl Unpin for WorkflowManager
impl !UnwindSafe for WorkflowManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more