Interface: WorkflowInfo
Workflow Execution information
Properties
attempt
readonlyattempt:number
Starts at 1 and increments for every retry if there is a retryPolicy
continueAsNewSuggested
readonlycontinueAsNewSuggested: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?
readonlyoptionalcontinuedFromExecutionRunId?:string
The last Run Id in this Execution Chain
cronSchedule?
readonlyoptionalcronSchedule?:string
Cron Schedule for this Execution. Set via WorkflowOptions.cronSchedule.
cronScheduleToScheduleInterval?
readonlyoptionalcronScheduleToScheduleInterval?:number
Milliseconds between Cron Runs
currentBuildId?
readonlyoptionalcurrentBuildId?: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.
Deprecated
Use currentDeploymentVersion instead
currentDeploymentVersion?
readonlyoptionalcurrentDeploymentVersion?:WorkerDeploymentVersion
The Deployment Version of the worker which executed the current Workflow Task. May be undefined if the task was completed by a worker without a Deployment Version. If this worker is the one executing this task for the first time and has a Deployment Version 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?
readonlyoptionalexecutionExpirationTime?:Date
Time at which the Workflow Execution expires
executionTimeoutMs?
readonlyoptionalexecutionTimeoutMs?:number
Milliseconds after which the Workflow Execution is automatically terminated by Temporal Server. Set via WorkflowOptions.workflowExecutionTimeout.
firstExecutionRunId
readonlyfirstExecutionRunId:string
Run Id of the first Run in this Execution Chain
historyLength
readonlyhistoryLength: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
readonlyhistorySize: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?
readonlyoptionallastFailure?:Error
Failure from the previous Run (present when this Run is a retry, or the last Run of a Cron Workflow failed)
lastResult?
readonlyoptionallastResult?: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?
readonlyoptionalmemo?:Record<string,unknown>
Non-indexed information attached to the Workflow Execution
namespace
readonlynamespace:string
Namespace this Workflow is executing in
originalExecutionRunId
readonlyoriginalExecutionRunId:string
The Run Id recorded on the WorkflowExecutionStarted event. Unlike runId, this value is
preserved across Workflow resets (a reset changes the execution's Run Id but keeps this one).
parent?
readonlyoptionalparent?:ParentWorkflowInfo
Parent Workflow info (present if this is a Child Workflow)
priority?
readonlyoptionalpriority?:Priority
Priority of this workflow
retryPolicy?
readonlyoptionalretryPolicy?:RetryPolicy
Retry Policy for this Execution. Set via WorkflowOptions.retry.
root?
readonlyoptionalroot?:RootWorkflowInfo
The root workflow execution, defined as follows:
- A workflow without a parent workflow is its own root workflow.
- A workflow with a parent workflow has the same root workflow as its parent.
When there is no parent workflow, i.e., the workflow is its own root workflow,
this field is undefined.
Note that Continue-as-New (or reset) propagates the workflow parentage relationship, and therefore, whether the new workflow has the same root workflow as the original one depends on whether it had a parent.
runId
readonlyrunId:string
ID of a single Workflow run
runStartTime
readonlyrunStartTime:Date
Time at which the current Workflow Run started
runTimeoutMs?
readonlyoptionalrunTimeoutMs?:number
Milliseconds after which the Workflow Run is automatically terminated by Temporal Server. Set via WorkflowOptions.workflowRunTimeout.
searchAttributes
readonlysearchAttributes:SearchAttributes
Indexed information attached to the Workflow Execution
This value may change during the lifetime of an Execution.
Deprecated
Use typedSearchAttributes instead.
startTime
readonlystartTime:Date
Time at which this Workflow Execution Chain was started
suggestedContinueAsNewReasons?
readonlyoptionalsuggestedContinueAsNewReasons?:SuggestContinueAsNewReason[]
Experimental
Reason(s) why continue as new is suggested. Can potentially be multiple reasons.
May be removed or changed in the future.
targetWorkerDeploymentVersionChanged
readonlytargetWorkerDeploymentVersionChanged:boolean
Experimental
Whether the workflow's Target Worker Deployment Version has changed from its Pinned Version.
When true, the workflow should consider continuing-as-new with
initialVersioningBehavior: 'AUTO_UPGRADE' to move to the new version.
This value changes during the lifetime of an Execution.
Upgrade-on-Continue-as-New is experimental and may change.
taskQueue
readonlytaskQueue:string
Task queue this Workflow is executing on
taskTimeoutMs
readonlytaskTimeoutMs:number
Maximum execution time of a Workflow Task in milliseconds. Set via WorkflowOptions.workflowTaskTimeout.
typedSearchAttributes
readonlytypedSearchAttributes:TypedSearchAttributes
Indexed information attached to the Workflow Execution, exposed through an interface.
This value may change during the lifetime of an Execution.
unsafe
readonlyunsafe:UnsafeWorkflowInfo
workflowId
readonlyworkflowId: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
readonlyworkflowType:string
Workflow function's name