pub struct WorkflowEngine { /* private fields */ }Expand description
Workflow execution engine
Implementations§
Source§impl WorkflowEngine
impl WorkflowEngine
Sourcepub fn new(
config: WorkflowEngineConfig,
registry: Arc<WorkflowRegistry>,
state_store: Arc<dyn StateStore>,
) -> Self
pub fn new( config: WorkflowEngineConfig, registry: Arc<WorkflowRegistry>, state_store: Arc<dyn StateStore>, ) -> Self
Create a new workflow engine
Sourcepub async fn start(&self) -> Result<(), WorkflowError>
pub async fn start(&self) -> Result<(), WorkflowError>
Start the workflow engine
Sourcepub async fn stop(&self) -> Result<(), WorkflowError>
pub async fn stop(&self) -> Result<(), WorkflowError>
Stop the workflow engine
Sourcepub async fn start_workflow(
&self,
workflow_id: &str,
version: &Version,
input: HashMap<String, Vec<u8>>,
) -> Result<WorkflowHandle, WorkflowError>
pub async fn start_workflow( &self, workflow_id: &str, version: &Version, input: HashMap<String, Vec<u8>>, ) -> Result<WorkflowHandle, WorkflowError>
Start a new workflow
Sourcepub async fn resume_workflow(
&self,
instance_id: WorkflowId,
) -> Result<WorkflowHandle, WorkflowError>
pub async fn resume_workflow( &self, instance_id: WorkflowId, ) -> Result<WorkflowHandle, WorkflowError>
Resume a workflow from saved state
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 !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