All Known Subinterfaces:
WorkflowExecutionOperations
All Known Implementing Classes:
VersionDelegate, WorkflowExecutionOperationsDelegation

public interface VersionPrimitive
Primitive for forking workflow logic mid-flight. Behaves like get-or-set on a per-stepName slot: a fresh live invocation records a migration step and returns the newVersion; a replay (or a workflow that already executed past this point under old code) returns the version recorded at the time. For larger changes prefer a separate workflow definition with a bumped @Workflow(workflowVersion=...).
Since:
5.4.0
Author:
Stefan Dragisic
  • Method Details

    • version

      Records (or reads back) the migration step for the given stepName. On the first live invocation with a strictly greater newVersion the step is appended; on replay (or past the call) the previously recorded value is returned via the result handle.
      Parameters:
      command - parameter object carrying the stepName and the desired newVersion.
      Returns:
      a WorkflowStepResult that resolves to the version this workflow has committed to for the given stepName.