Interface VersionPrimitive
- 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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceParameter object for the primitive. -
Method Summary
Modifier and TypeMethodDescriptionversion(VersionPrimitive.VersionCommand command) Records (or reads back) the migration step for the givenstepName.
-
Method Details
-
version
Records (or reads back) the migration step for the givenstepName. On the first live invocation with a strictly greaternewVersionthe step is appended; on replay (or past the call) the previously recorded value is returned via the result handle.- Parameters:
command- parameter object carrying thestepNameand the desirednewVersion.- Returns:
- a
WorkflowStepResultthat resolves to the version this workflow has committed to for the givenstepName.
-