Run class

Represents a workflow run that tracks status and emitted events.

Constructors

Run({required String sessionId, RunStatus status = RunStatus.notStarted, Iterable<WorkflowEvent> outgoingEvents = const <WorkflowEvent>[], CheckpointInfo? lastCheckpoint, Future<void> resumeCallback(Iterable<ExternalResponse> responses, CancellationToken cancellationToken)?, Future<void> disposeCallback()?})
Creates a workflow run.
Run.forSession(WorkflowSession session, {RunStatus status = RunStatus.notStarted, Iterable<WorkflowEvent> outgoingEvents = const <WorkflowEvent>[], CheckpointInfo? lastCheckpoint})
Creates a workflow run for session.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDisposed → bool
Gets whether this run has been disposed.
no setter
lastCheckpoint ↔ CheckpointInfo?
Gets the most recent checkpoint information.
getter/setter pair
newEventCount → int
Gets the number of events emitted since the last access to newEvents.
no setter
newEvents → List<WorkflowEvent>
Gets all events emitted since the last access to newEvents.
no setter
outgoingEvents → List<WorkflowEvent>
Gets all events emitted by the workflow.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionId → String
Gets a unique identifier for the session.
final

Methods

addEvent(WorkflowEvent event) → void
Adds an emitted workflow event to this run.
disposeAsync() → Future<void>
Disposes this run.
getStatusAsync({CancellationToken? cancellationToken}) → Future<RunStatus>
Gets the current execution status of the workflow run.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resumeAsync(Iterable<ExternalResponse> responses, {CancellationToken? cancellationToken}) → Future<void>
Resumes execution with external responses.
setStatus(RunStatus status) → void
Sets the current status.
toString() → String
A string representation of this object.
inherited

Operators

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