Skip to main content

WorkflowRepository

Trait WorkflowRepository 

Source
pub trait WorkflowRepository: Send + Sync {
    // Required methods
    fn create_new_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance: &'life1 WorkflowInstance,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn persist_workflow<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance: &'life1 WorkflowInstance,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn persist_workflow_with_subscriptions<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        instance: &'life1 WorkflowInstance,
        subscriptions: &'life2 [EventSubscription],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_runnable_instances<'life0, 'async_trait>(
        &'life0 self,
        as_at: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_workflow_instance<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<WorkflowInstance>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_workflow_instance_by_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<WorkflowInstance>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_workflow_instances<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ids: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowInstance>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn next_definition_sequence<'life0, 'life1, 'async_trait>(
        &'life0 self,
        definition_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Persistence for workflow instances.

Required Methods§

Source

fn create_new_workflow<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 WorkflowInstance, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn persist_workflow<'life0, 'life1, 'async_trait>( &'life0 self, instance: &'life1 WorkflowInstance, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn persist_workflow_with_subscriptions<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, instance: &'life1 WorkflowInstance, subscriptions: &'life2 [EventSubscription], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_runnable_instances<'life0, 'async_trait>( &'life0 self, as_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_workflow_instance<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WorkflowInstance>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_workflow_instance_by_name<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WorkflowInstance>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_workflow_instances<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowInstance>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn next_definition_sequence<'life0, 'life1, 'async_trait>( &'life0 self, definition_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Atomically allocate the next sequence number for a given workflow definition id. Used by the host to assign human-friendly names of the form {definition_id}-{N} before inserting a new workflow instance. Guaranteed monotonic per definition_id; no guarantees across definitions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§