Interface: EventGroup
workflow.EventGroup
A discrete token used to associate workflow commands (and the corresponding history events) with a logical "group" for UI/observability purposes. Multiple Event Groups may be attached to a single command, and a single Event Group may be attached to multiple commands.
Created using createEventGroup.
Event Groups is an experimental API and may change without notice.
Methods
withScope
▸ withScope<T>(fn): Promise<T>
Run fn in a scope in which this Event Group is implicitly attached to every command
produced by the workflow code that executes within. Event Group scopes nest: when called from
within another Event Group's withScope, all outer groups remain attached as well.
Only callable from a Workflow Execution.
Event Groups is an experimental API and may change without notice.
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type |
|---|---|
fn | () => Promise<T> |
Returns
Promise<T>