Interface WorkflowStore

All Known Implementing Classes:
EventSourcedWorkflowStore

@Internal public interface WorkflowStore
Narrow adapter around workflow-state repositories used during startup.
Since:
5.4.0
Author:
Simon Zambrovski
  • Method Details

    • loadRunningWorkflows

      CompletableFuture<RunningWorkflows> loadRunningWorkflows(ProcessingContext processingContext)
      Loads the singleton running-workflows projection.
      Parameters:
      processingContext - processing context used for sourcing
      Returns:
      current running workflow ids
    • loadWorkflow

      CompletableFuture<WorkflowState> loadWorkflow(String workflowId, ProcessingContext processingContext)
      Loads the event-sourced durable state for a workflow id.
      Parameters:
      workflowId - workflow identifier
      processingContext - processing context used for sourcing
      Returns:
      durable workflow state
    • findWorkflow

      CompletableFuture<Optional<WorkflowState>> findWorkflow(String workflowId, ProcessingContext processingContext)
      Sources the state of a workflow that may not exist.
      Parameters:
      workflowId - identifier of the workflow to source
      processingContext - processing context the sourcing runs in
      Returns:
      a future completing with the sourced state, or empty when the store holds no events for the workflow