WorkflowHost class final

Owns or borrows an existing workflow app, without adding another engine.

create and inMemory start and own their apps. attach never starts or closes the borrowed app. Closing stops local observation, not durable runs.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether close has begun and new operations are rejected.
no setter
pollInterval → Duration
Fallback poll interval when the store has no complete native change feed.
final
resultTimeout → Duration?
Observation deadline from first result access, not an execution limit.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Stops observations and joins admitted operations before owned cleanup.
emitEvent<T>(WorkflowEventRef<T> event, T value) → Future<void>
Emits on a topic, potentially resuming multiple matching runs.
execute<I, R>(HostedWorkflow<I, R> workflow, I input) → Future<R>
Submits a workflow and observes its typed terminal result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe<I, R>(HostedWorkflow<I, R> workflow, String id) → Future<HostedRun<R>>
Reattaches to a persisted run without submitting another execution.
recover({int limit = 100}) → Future<WorkflowRecoveryReport>
Re-enqueues a bounded batch of registered runnable workflow runs.
submit<I, R>(HostedWorkflow<I, R> workflow, I input) → Future<HostedRun<R>>
Persists and enqueues a new run using the registered input codec.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

attach({required StemWorkflowApp app, required Iterable<HostedDefinition> workflows, PayloadCodecRegistry? codecs, Duration? resultTimeout, Duration pollInterval = const Duration(milliseconds: 100)}) → Future<WorkflowHost>
Borrows an app without starting, stopping, or modifying its registry.
create({required Future<StemWorkflowApp> createApp(List<WorkflowDefinition<Object?>>), required Iterable<HostedDefinition> workflows, PayloadCodecRegistry? codecs, Duration? resultTimeout, Duration pollInterval = const Duration(milliseconds: 100)}) → Future<WorkflowHost>
Creates, starts, and owns an app supplied by createApp.
inMemory({required Iterable<HostedDefinition> workflows, PayloadCodecRegistry? codecs, Duration? resultTimeout, Duration pollInterval = const Duration(milliseconds: 100)}) → Future<WorkflowHost>
Creates and starts an owned in-memory workflow app.