FencedWorkflowStore class abstract interface

Optional capability for stores that can fence workflow execution attempts.

A store implementing this interface must generate a fresh WorkflowExecutionClaim.executionId for every successful claim and require that id for lease mutation and terminal failure finalization. This prevents a stale delivery from mutating a newer execution owned by the same runtime.

A claim rejects any active lease, including one with the same logical owner. Release retains execution identity for failure recovery; a new claim or an explicit resume/rewind invalidates the old identity. Legacy owner-only lease operations must not renew or release tokenized executions.

This capability fences lease operations and terminal-failure finalization. It does not make every WorkflowStore mutation conditional or make external side effects exactly-once.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

claimRunExecution(String runId, {required String ownerId, Duration leaseDuration = const Duration(seconds: 30)}) Future<WorkflowExecutionClaim?>
Atomically claims runId, returning its unique execution identity.
markFailedForExecution(String runId, {required String executionId, required Object error, required StackTrace stack, bool terminal = true}) Future<TerminalFailureResult>
Records an error only if the captured execution is still current.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseRunExecution(String runId, {required String executionId}) Future<void>
Releases a lease only when executionId is still current.
renewRunExecution(String runId, {required String executionId, Duration leaseDuration = const Duration(seconds: 30)}) Future<bool>
Renews a still-active, unexpired lease only when executionId is current.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited