Skip to main content

Interface: ActivitySerializationContext

common.ActivitySerializationContext

Context provided to data converters for payloads owned by an activity.

This is used when converting activity arguments, results, heartbeat details, and activity-related failures.

Serialization context is an experimental feature and may change.

Properties​

activityId​

• Optional activityId: string

Activity ID of the activity that owns the payload.

Workflow-side scheduling contexts use the explicit ActivityOptions.activityId when supplied, otherwise they use the same generated fallback ID sent to the Temporal service. Runtime activity contexts use the activity ID supplied by ActivityInfo or activity task data.


isLocal​

• isLocal: boolean

Whether the activity is a local activity started from a workflow.


namespace​

• namespace: string

Namespace of the activity that owns the payload.


type​

• type: "activity"

Always 'activity' for activity-owned payloads.


workflowId​

• Optional workflowId: string

Workflow ID of the workflow that scheduled the activity, when known.