Interface: WorkflowInfo
workflow.WorkflowInfo
Workflow Execution information
Properties
attempt
• Readonly
attempt: number
Starts at 1 and increments for every retry if there is a retryPolicy
continueAsNewSuggested
• Readonly
continueAsNewSuggested: boolean
A hint provided by the current WorkflowTaskStarted event recommending whether to continueAsNew.
This value changes during the lifetime of an Execution.
Supported only on Temporal Server 1.20+, always false
on older servers.
continuedFromExecutionRunId
• Optional
Readonly
continuedFromExecutionRunId: string
The last Run Id in this Execution Chain
cronSchedule
• Optional
Readonly
cronSchedule: string
Cron Schedule for this Execution. Set via WorkflowOptions.cronSchedule.
cronScheduleToScheduleInterval
• Optional
Readonly
cronScheduleToScheduleInterval: number
Milliseconds between Cron Runs
currentBuildId
• Optional
Readonly
currentBuildId: string
The Build ID of the worker which executed the current Workflow Task. May be undefined if the task was completed by a worker without a Build ID. If this worker is the one executing this task for the first time and has a Build ID set, then its ID will be used. This value may change over the lifetime of the workflow run, but is deterministic and safe to use for branching.
executionExpirationTime
• Optional
Readonly
executionExpirationTime: Date
Time at which the Workflow Execution expires
executionTimeoutMs
• Optional
Readonly
executionTimeoutMs: number
Milliseconds after which the Workflow Execution is automatically terminated by Temporal Server. Set via WorkflowOptions.workflowExecutionTimeout.
firstExecutionRunId
• Readonly
firstExecutionRunId: string
Run Id of the first Run in this Execution Chain
historyLength
• Readonly
historyLength: number
Length of Workflow history up until the current Workflow Task.
This value changes during the lifetime of an Execution.
You may safely use this information to decide when to continueAsNew.
historySize
• Readonly
historySize: number
Size of Workflow history in bytes until the current Workflow Task.
This value changes during the lifetime of an Execution.
Supported only on Temporal Server 1.20+, always zero on older servers.
You may safely use this information to decide when to continueAsNew.
lastFailure
• Optional
Readonly
lastFailure: TemporalFailure
Failure from the previous Run (present when this Run is a retry, or the last Run of a Cron Workflow failed)
lastResult
• Optional
Readonly
lastResult: unknown
Result from the previous Run (present if this is a Cron Workflow or was Continued As New).
An array of values, since other SDKs may return multiple values from a Workflow.
memo
• Optional
Readonly
memo: Record
<string
, unknown
>
Non-indexed information attached to the Workflow Execution
namespace
• Readonly
namespace: string
Namespace this Workflow is executing in
parent
• Optional
Readonly
parent: ParentWorkflowInfo
Parent Workflow info (present if this is a Child Workflow)
retryPolicy
• Optional
Readonly
retryPolicy: RetryPolicy
Retry Policy for this Execution. Set via WorkflowOptions.retry.
runId
• Readonly
runId: string
ID of a single Workflow run
runStartTime
• Readonly
runStartTime: Date
Time at which the current Workflow Run started
runTimeoutMs
• Optional
Readonly
runTimeoutMs: number
Milliseconds after which the Workflow Run is automatically terminated by Temporal Server. Set via WorkflowOptions.workflowRunTimeout.
searchAttributes
• Readonly
searchAttributes: SearchAttributes
Indexed information attached to the Workflow Execution
This value may change during the lifetime of an Execution.
startTime
• Readonly
startTime: Date
Time at which this Workflow Execution Chain was started
taskQueue
• Readonly
taskQueue: string
Task queue this Workflow is executing on
taskTimeoutMs
• Readonly
taskTimeoutMs: number
Maximum execution time of a Workflow Task in milliseconds. Set via WorkflowOptions.workflowTaskTimeout.
unsafe
• Readonly
unsafe: UnsafeWorkflowInfo
workflowId
• Readonly
workflowId: string
ID of the Workflow, this can be set by the client during Workflow creation. A single Workflow may run multiple times e.g. when scheduled with cron.
workflowType
• Readonly
workflowType: string
Workflow function's name