Skip to main content

Interface: Info

activity.Info

Holds information about the current Activity Execution. Retrieved inside an Activity with Context.current().info.

Properties

activityId

Readonly activityId: string

ID of this activity


activityNamespace

Readonly activityNamespace: string

The namespace this Activity is running in

Deprecated

Use namespace instead


activityRunId

Optional Readonly activityRunId: string

ID of the current run of this activity. Can be used to differentiate between different activity executions that share the same ID. Activities started by a Workflow don't have activity run ID - instead, they can be identified by workflow ID and workflow run ID; see workflowExecution

Standalone Activities are experimental. APIs may be subject to change.


activityType

Readonly activityType: string

Exposed Activity function name


attempt

Readonly attempt: number

Attempt number for this activity. Starts at 1 and increments for every retry.


base64TaskToken

Readonly base64TaskToken: string

Base64 encoded taskToken


currentAttemptScheduledTimestampMs

Readonly currentAttemptScheduledTimestampMs: number

Timestamp for when the current attempt of this Activity was scheduled.

Format

number of milliseconds from epoch


heartbeatDetails

Readonly heartbeatDetails: any

The details from the last recorded heartbeat from the last attempt of this Activity.

Use this to resume your Activity from a checkpoint.


heartbeatTimeoutMs

Optional Readonly heartbeatTimeoutMs: number

Heartbeat timeout. If this timeout is defined, the Activity must heartbeat before the timeout is reached. The Activity must not heartbeat in case this timeout is not defined.

Format

number of milliseconds


inWorkflow

Readonly inWorkflow: boolean

Whether this activity was started by a workflow

Standalone Activities are experimental. APIs may be subject to change.


isLocal

Readonly isLocal: boolean

Whether this activity is scheduled in local or remote mode


namespace

Readonly namespace: string

The namespace this Activity is running in


priority

Optional Readonly priority: Priority

Priority of this activity


retryPolicy

Optional Readonly retryPolicy: RetryPolicy

The retry policy of this activity.

Note that the server may have set a different policy than the one provided when scheduling the activity. If the value is undefined, it means the server didn't send information about retry policy (e.g. due to old server version), but it may still be defined server-side.


scheduleToCloseTimeoutMs

Readonly scheduleToCloseTimeoutMs: number

Timeout for this Activity from schedule to close.

Format

number of milliseconds


scheduledTimestampMs

Readonly scheduledTimestampMs: number

Timestamp for when this Activity was first scheduled. For retries, this will have the timestamp of the first attempt. See currentAttemptScheduledTimestampMs for current attempt.

Format

number of milliseconds from epoch


startToCloseTimeoutMs

Readonly startToCloseTimeoutMs: number

Timeout for this Activity from start to close.

Format

number of milliseconds


taskQueue

Readonly taskQueue: string

Task Queue the Activity is scheduled in.

For Local Activities, this is set to the Workflow's Task Queue.


taskToken

Readonly taskToken: Uint8Array

Task token associated with this activity execution. Can be used for asynchronous completion


workflowExecution

Optional Readonly workflowExecution: Object

Information about the Workflow that scheduled the Activity. Not set if the activity was not started by a Workflow

Type declaration

NameType
runIdstring
workflowIdstring

workflowNamespace

Optional Readonly workflowNamespace: string

The namespace of the Workflow that scheduled this Activity. Not set if the activity was not started by a Workflow

Deprecated

Use namespace instead


workflowType

Optional Readonly workflowType: string

The module name of the Workflow that scheduled this Activity. Not set if the activity was not started by a Workflow