module documentation

Event Groups, a way to group logically related workflow events.

Warning

Event Groups is an experimental API and may change without notice.

Class EventGroup A discrete token associating workflow commands, and the history events they produce, with a logical group for UI and observability purposes.
Function create_event_group Create an Event Group that can be attached to commands scheduled by this workflow.
Class _ActiveEventGroups Undocumented
Class _ImplicitEventGroup An Event Group created by the SDK around an inbound signal or update.
Class _LabelEventGroup An Event Group explicitly created by workflow code.
Class _StubImplicitEventGroup No-op implicit group used when an inbound event ID is missing or invalid.
Function _capture_event_group_markers Snapshot ambient and directly attached Event Groups as command markers.
Function _inbound_event_group Create the implicit Event Group for an inbound signal's history event.
Function _inbound_update_event_group Create the implicit Event Group for an inbound update.
Variable _active_event_groups Undocumented
def create_event_group(id: str, *, label: str | None = None) -> EventGroup: (source)

Create an Event Group that can be attached to commands scheduled by this workflow.

Attach the returned group via command event_groups options, or via EventGroup.scope.

Warning

Event Groups is an experimental API and may change without notice.

Parameters
id:strNon-empty group identity. Commands with the same id belong to the same group. The user-provided ID is stored as plain text in the workflow history and should therefore not contain sensitive information.
label:str | NoneOptional non-empty display text for the UI / CLI. If provided, it is persisted to history as a codec-encoded Payload.
Returns
EventGroupUndocumented
def _capture_event_group_markers(directs: Sequence[EventGroup] | None) -> list[temporalio.api.sdk.v1.EventGroupMarker]: (source)

Snapshot ambient and directly attached Event Groups as command markers.

Must be called from the context the command was requested in, which is not necessarily the one it is ultimately built in.

def _inbound_event_group(event_id: int) -> EventGroup: (source)

Create the implicit Event Group for an inbound signal's history event.

def _inbound_update_event_group(update_id: str) -> EventGroup: (source)

Create the implicit Event Group for an inbound update.