WorkflowRuntime
WorkflowRuntime is the durable orchestrator. It is not WorkflowEngine. Construct it with storage and modules.
dart
WorkflowRuntime({
required WorkflowStorage storage,
WorkflowRegistry? workflows,
OperationRegistry? operations,
Iterable<WorkflowModule> modules = const [],
WorkflowObserver observer = const NoopWorkflowObserver(),
WorkflowRuntimeOptions options = const WorkflowRuntimeOptions(),
});Direct Runtime API
| API | Purpose |
|---|---|
start(ref, input) | Typed start |
startEncoded(key, input) | Wire/JSON start |
drive(runId) | Replay until blocked or terminal |
requireState(runId) | Load run, history, and commands |
query(runId, name) | Read-only published query |
loadWorkItem | Load one projected work item |
claimWork / releaseWork | Manage pooled audience |
respond | Record an actor response and resume |
sendEvent | Send an idempotent external event |
cancel | Cancel a run and runnable commands |
retryOperation | Retry an exhausted operation |
redrive | Re-evaluate a failed or stuck run |
fireDueTimers | Fire due timers |
expireDueWork | Expire bounded work |
recoverRunnableRuns | Resume interrupted decisions |
runOneOperation | Lease and execute one operation |
runOneWorkflowSpawn | Reconcile one spawn command |
Starts accept an optional run ID, correlation ID, and WorkflowRunMetadata.
Options
dart
const WorkflowRuntimeOptions({
int maxHistoryEvents = 50000,
int continueAsNewSuggestedAt = 10000,
});Production Host
Most products use WorkflowServerApplication from vyuh_workflow_service instead of calling these methods directly.