Skip to main content

WorkflowService

Trait WorkflowService 

Source
pub trait WorkflowService: Send + Sync {
    // Required methods
    fn send_workflow_event<'a>(
        &'a self,
        command: &'a WorkflowEventCommand,
    ) -> ContractFuture<'a, WorkflowEventReceipt>;
    fn submit_workflow<'a>(
        &'a self,
        command: &'a SubmitCommand,
    ) -> ContractFuture<'a, WorkflowSnapshot>;
    fn workflow_status<'a>(
        &'a self,
        scope: &'a Scope,
        id: &'a str,
    ) -> ContractFuture<'a, WorkflowSnapshot>;
    fn workflow_result<'a>(
        &'a self,
        scope: &'a Scope,
        id: &'a str,
    ) -> ContractFuture<'a, WorkflowResult>;
    fn activation_context<'a>(
        &'a self,
        owner: &'a LeaseOwner,
    ) -> ContractFuture<'a, WorkflowActivationContext>;
    fn record_local_result<'a>(
        &'a self,
        command: &'a LocalResultCommand,
    ) -> ContractFuture<'a, LocalResultReceipt>;
    fn cancel_workflow<'a>(
        &'a self,
        scope: &'a Scope,
        id: &'a str,
    ) -> ContractFuture<'a, WorkflowSnapshot>;
}
Expand description

Client and interactive-worker operations. Unsupported implementations must reject explicitly instead of silently submitting an ordinary task.

Required Methods§

Source

fn send_workflow_event<'a>( &'a self, command: &'a WorkflowEventCommand, ) -> ContractFuture<'a, WorkflowEventReceipt>

Accept a directly addressed, one-shot event after committing its receipt. Exact source/ID/key/payload replays must reconcile before terminal checks. Implementations serialize acceptance and wait resolution under workflow authority; caller timestamps never decide event/deadline eligibility.

Source

fn submit_workflow<'a>( &'a self, command: &'a SubmitCommand, ) -> ContractFuture<'a, WorkflowSnapshot>

Source

fn workflow_status<'a>( &'a self, scope: &'a Scope, id: &'a str, ) -> ContractFuture<'a, WorkflowSnapshot>

Source

fn workflow_result<'a>( &'a self, scope: &'a Scope, id: &'a str, ) -> ContractFuture<'a, WorkflowResult>

Source

fn activation_context<'a>( &'a self, owner: &'a LeaseOwner, ) -> ContractFuture<'a, WorkflowActivationContext>

Source

fn record_local_result<'a>( &'a self, command: &'a LocalResultCommand, ) -> ContractFuture<'a, LocalResultReceipt>

Source

fn cancel_workflow<'a>( &'a self, scope: &'a Scope, id: &'a str, ) -> ContractFuture<'a, WorkflowSnapshot>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§