Interface WorkflowStore
- All Known Implementing Classes:
EventSourcedWorkflowStore
Narrow adapter around workflow-state repositories used during startup.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Method Summary
Modifier and TypeMethodDescriptionfindWorkflow(String workflowId, ProcessingContext processingContext) Sources the state of a workflow that may not exist.loadRunningWorkflows(ProcessingContext processingContext) Loads the singleton running-workflows projection.loadWorkflow(String workflowId, ProcessingContext processingContext) Loads the event-sourced durable state for a workflow id.
-
Method Details
-
loadRunningWorkflows
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 identifierprocessingContext- 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 sourceprocessingContext- 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
-