Skip to main content

WorkflowDefinition

Trait WorkflowDefinition 

Source
pub trait WorkflowDefinition: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn start<'life0, 'async_trait>(
        &'life0 self,
        data: Value,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<WorkflowState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute_task<'life0, 'life1, 'async_trait>(
        &'life0 self,
        task_id: &'life1 str,
        data: Value,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<TaskState>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_tasks<'life0, 'life1, 'async_trait>(
        &'life0 self,
        workflow_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = WorkflowResult<Vec<TaskState>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Workflow definition trait

Required Methods§

Source

fn name(&self) -> &str

Source

fn start<'life0, 'async_trait>( &'life0 self, data: Value, ) -> Pin<Box<dyn Future<Output = WorkflowResult<WorkflowState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn execute_task<'life0, 'life1, 'async_trait>( &'life0 self, task_id: &'life1 str, data: Value, ) -> Pin<Box<dyn Future<Output = WorkflowResult<TaskState>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_tasks<'life0, 'life1, 'async_trait>( &'life0 self, workflow_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = WorkflowResult<Vec<TaskState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§