Skip to main content

Interface: 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?​

readonly optional 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


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?​

readonly optional 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


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?​

readonly optional priority?: Priority

Priority of this activity


retryPolicy?​

readonly optional 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.


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


scheduleToCloseTimeoutMs​

readonly scheduleToCloseTimeoutMs: number

Timeout for this Activity from schedule to close.

Format​

number of milliseconds


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?​

readonly optional workflowExecution?: object

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

runId​

readonly runId: string

workflowId​

readonly workflowId: string


workflowNamespace?​

readonly optional 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?​

readonly optional workflowType?: string

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