Class WorkflowSnapshotConfiguration

java.lang.Object
io.axoniq.framework.workflow.configuration.WorkflowSnapshotConfiguration

public class WorkflowSnapshotConfiguration extends Object
The snapshot settings of the workflow engine, customized through WorkflowConfigurer.snapshots(java.util.function.Function<io.axoniq.framework.workflow.configuration.WorkflowSnapshotConfiguration, io.axoniq.framework.workflow.configuration.WorkflowSnapshotConfiguration>).

Snapshots are disabled by default. Once enabled, the engine snapshots:

  • The running-workflow list, as its snapshot policy dictates. There is one list, so there is one snapshot of it.
  • The state of each workflow instance, as its snapshot policy dictates. Every workflow instance has a snapshot of its own.
A restarting node then sources either from its latest snapshot instead of from every event ever published.

Example usage:


 WorkflowConfigurer.create()
                   .snapshots(snapshots -> snapshots.enabled(true)
                                                    .runningWorkflows(SnapshotPolicy.afterEvents(500))
                                                    .workflowState(SnapshotPolicy.afterEvents(200)));
 
Since:
5.4.2
Author:
Stefan Dragisic
  • Constructor Details

    • WorkflowSnapshotConfiguration

      public WorkflowSnapshotConfiguration()
  • Method Details