PostgresWorkflowStore class
PostgreSQL-backed WorkflowStore implementation.
Properties
Methods
-
cancel(
String runId, {String? reason}) → Future< void> -
Transitions the run to
WorkflowStatus.cancelled. -
close(
) → Future< void> -
createRun(
{required String workflow, required Map< String, Object?> params, String? parentRunId, Duration? ttl, WorkflowCancellationPolicy? cancellationPolicy}) → Future<String> -
dueRuns(
DateTime now, {int limit = 256}) → Future< List< String> > -
Returns run identifiers whose wake-up time is at or before
now. -
get(
String runId) → Future< RunState?> -
listRuns(
{String? workflow, WorkflowStatus? status, int limit = 50}) → Future< List< RunState> > -
Returns recent runs filtered by
workflowand/orstatus. -
listSteps(
String runId) → Future< List< WorkflowStepEntry> > - Returns persisted step results for inspection/debugging.
-
listWatchers(
String topic, {int limit = 256}) → Future< List< WorkflowWatcher> > -
Lists outstanding watchers for
topic(primarily for operator tooling). The metadata helps CLIs and dashboards explain why a run is waiting. -
markCompleted(
String runId, Object? result) → Future< void> -
markFailed(
String runId, Object error, StackTrace stack, {bool terminal = false}) → Future< void> -
markResumed(
String runId, {Map< String, Object?> ? data}) → Future<void> - Clears suspension metadata when the run is ready to execute again.
-
markRunning(
String runId, {String? stepName}) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readStep<
T> (String runId, String stepName) → Future< T?> -
registerWatcher(
String runId, String stepName, String topic, {DateTime? deadline, Map< String, Object?> ? data}) → Future<void> -
Registers a durable watcher for
topicso the runtime can resumestepNamewhen an event is emitted. -
resolveWatchers(
String topic, Map< String, Object?> payload, {int limit = 256}) → Future<List< WorkflowWatcherResolution> > -
Resolves watchers listening on
topic, persistingpayloadand marking runs ready to resume atomically. Returns the resolved watchers so the runtime can enqueue follow-up work. -
rewindToStep(
String runId, String stepName) → Future< void> -
Rewinds a run so the given
stepName(and subsequent steps) will execute again on the next resume. -
runsWaitingOn(
String topic, {int limit = 256}) → Future< List< String> > -
Returns run identifiers currently suspended on
topic. -
saveStep<
T> (String runId, String stepName, T value) → Future< void> -
Saves a checkpoint for
stepNameand refreshes the run heartbeat. -
suspendOnTopic(
String runId, String stepName, String topic, {DateTime? deadline, Map< String, Object?> ? data}) → Future<void> -
Suspends
runIdwhile awaiting an event withtopic. -
suspendUntil(
String runId, String stepName, DateTime when, {Map< String, Object?> ? data}) → Future<void> -
Suspends
runIduntil the givenwhen. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited