WorkflowDispatch

Trait WorkflowDispatch 

Source
pub trait WorkflowDispatch: Send + Sync {
    // Required method
    fn start_by_name(
        &self,
        workflow_name: &str,
        input: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Uuid>> + Send + '_>>;
}
Expand description

Trait for starting workflows from function contexts.

This trait allows mutation and action contexts to start workflows without directly depending on the runtime’s WorkflowExecutor.

Required Methods§

Source

fn start_by_name( &self, workflow_name: &str, input: Value, ) -> Pin<Box<dyn Future<Output = Result<Uuid>> + Send + '_>>

Start a workflow by its registered name.

§Arguments
  • workflow_name - The registered name of the workflow
  • input - JSON-serialized input for the workflow
§Returns

The UUID of the started workflow run

Implementors§