Workflows
Stem workflows orchestrate durable, typed functions over the normal task
runtime. Begin with WorkflowHost:
HostedWorkflow<I, R>, submit, and a typed HostedRun<R>.
context.step is a named checkpoint around a local Dart callback, not a remote
activity. Execution and external effects are at least once, so use idempotency.
host.close() closes owned resources and observers; it does not cancel
persisted runs or forcibly interrupt Dart code.
Choose Flows and Scripts for declared steps, or Annotated Workflows for generated refs. Then read Getting Started, Starting and Waiting, Suspensions and Events, and Context and Serialization.