Class EventSourcedRunningWorkflows

java.lang.Object
io.axoniq.framework.workflow.runtime.execution.EventSourcedRunningWorkflows
All Implemented Interfaces:
RunningWorkflows

@Internal public class EventSourcedRunningWorkflows extends Object implements RunningWorkflows
Event sourced collection of running workflow IDs, loaded by WorkflowStore.

The version is the release that introduced the snapshot format, see getWorkflowIds().

Since:
5.4.0
Author:
Simon Zambrovski
  • Field Details

    • ENTITY_ID

      public static final String ENTITY_ID
      Singleton identifier of the running-workflows entity.
      See Also:
  • Constructor Details

    • EventSourcedRunningWorkflows

      public EventSourcedRunningWorkflows()
  • Method Details

    • criteriaBuilder

      public static EventCriteria criteriaBuilder()
      Returns the criteria selecting workflow lifecycle events introduced by ADR-007.
      Returns:
      event criteria for workflow lifecycle reconstruction
    • evolve

      public void evolve(Metadata metadata)
      Applies workflow lifecycle metadata to this collection.
      Parameters:
      metadata - lifecycle event metadata
    • getWorkflowIds

      public Set<String> getWorkflowIds()
      Returns the identifiers of the running workflows, for a converter writing this collection as a snapshot.
      Returns:
      the identifiers of the running workflows
    • setWorkflowIds

      public void setWorkflowIds(Set<String> workflowIds)
      Sets the identifiers of the running workflows, for a converter reading this collection from a snapshot.
      Parameters:
      workflowIds - the identifiers of the running workflows
    • workflowIds

      public Set<String> workflowIds()
      Description copied from interface: RunningWorkflows
      Returns the current set of running workflow identifiers.
      Specified by:
      workflowIds in interface RunningWorkflows
      Returns:
      immutable set of workflow identifiers
    • contains

      public boolean contains(String workflowId)
      Description copied from interface: RunningWorkflows
      Checks whether the given workflow identifier is currently running.
      Specified by:
      contains in interface RunningWorkflows
      Parameters:
      workflowId - workflow identifier to inspect
      Returns:
      true if the workflow is running