Class: WorkflowExecutionStartedEventAttributes
history.v1.WorkflowExecutionStartedEventAttributes
Always the first event in workflow history
Properties
attempt
• attempt: number
Starting at 1, the number of times we have tried to execute this workflow
completionCallbacks
• completionCallbacks: $Properties[]
Completion callbacks attached when this workflow was started.
continuedExecutionRunId
• continuedExecutionRunId: string
Run id of the previous workflow which continued-as-new or retried or cron executed into this workflow.
continuedFailure
• Optional continuedFailure: null | $Properties
WorkflowExecutionStartedEventAttributes continuedFailure.
cronSchedule
• cronSchedule: string
If this workflow runs on a cron schedule, it will appear here
declinedTargetVersionUpgrade
• Optional declinedTargetVersionUpgrade: null | $Properties
During a previous run of this workflow, the server may have notified the SDK that the Target Worker Deployment Version changed, but the SDK declined to upgrade (e.g., by continuing-as-new with PINNED behavior). This field records the target version that was declined.
This is a wrapper message to distinguish "never declined" (nil wrapper) from "declined an unversioned target" (non-nil wrapper with nil deployment_version).
Used internally by the server during continue-as-new and retry. Should not be read or interpreted by SDKs.
eagerExecutionAccepted
• eagerExecutionAccepted: boolean
A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and eager execution was accepted by the server. Only populated by server with version >= 1.29.0.
firstExecutionRunId
• firstExecutionRunId: string
This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. Used to identify a chain.
firstWorkflowTaskBackoff
• Optional firstWorkflowTaskBackoff: null | $Properties
For a cron workflow, this contains the amount of time between when this iteration of the cron workflow was scheduled and when it should run next per its cron_schedule.
header
• Optional header: null | $Properties
WorkflowExecutionStartedEventAttributes header.
identity
• identity: string
Identity of the client who requested this execution
inheritedAutoUpgradeInfo
• Optional inheritedAutoUpgradeInfo: null | $Properties
If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the first workflow task, this field is set to the deployment version on which the parent/ previous run was operating. This inheritance only happens when the task queues belong to the same deployment version. The first workflow task will then be dispatched to either this inherited deployment version, or the current deployment version of the task queue's Deployment. After the first workflow task, the effective behavior depends on worker-sent values in subsequent workflow tasks.
Inheritance rules:
- ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version
- Cron: never inherits
- Retry: inherits only if the retried run is effectively AutoUpgrade at the time of retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same deployment as the parent/previous run)
Additional notes:
- This field is mutually exclusive with
inherited_pinned_version. versioning_override, if present, overrides this field during routing decisions.- SDK implementations do not interact with this field and is only used internally by the server to ensure task routing correctness.
inheritedBuildId
• inheritedBuildId: string
When present, this execution is assigned to the build ID of its parent or previous execution. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
inheritedPinnedVersion
• Optional inheritedPinnedVersion: null | $Properties
If present, the new workflow should start on this version with pinned base behavior. Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the new run's Task Queue belongs to that version.
A new run initiated by workflow Cron will never inherit.
A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
Pinned override is inherited if Task Queue of new run is compatible with the override version. Override is inherited separately and takes precedence over inherited base version.
Note: This field is mutually exclusive with inherited_auto_upgrade_info. Additionaly, versioning_override, if present, overrides this field during routing decisions.
initiator
• initiator: ContinueAsNewInitiator
WorkflowExecutionStartedEventAttributes initiator.
input
• Optional input: null | $Properties
SDK will deserialize this and provide it as arguments to the workflow function
lastCompletionResult
• Optional lastCompletionResult: null | $Properties
WorkflowExecutionStartedEventAttributes lastCompletionResult.
memo
• Optional memo: null | $Properties
WorkflowExecutionStartedEventAttributes memo.
originalExecutionRunId
• originalExecutionRunId: string
This is the run id when the WorkflowExecutionStarted event was written. A workflow reset changes the execution run_id, but preserves this field.
parentInitiatedEventId
• parentInitiatedEventId: Long
EventID of the child execution initiated event in parent workflow
parentInitiatedEventVersion
• parentInitiatedEventVersion: Long
Version of the child execution initiated event in parent workflow It should be used together with parent_initiated_event_id to identify a child initiated event for global namespace
parentPinnedWorkerDeploymentVersion
• parentPinnedWorkerDeploymentVersion: string
When present, it means this is a child workflow of a parent that is Pinned to this Worker
Deployment Version. In this case, child workflow will start as Pinned to this Version instead
of starting on the Current Version of its Task Queue.
This is set only if the child workflow is starting on a Task Queue belonging to the same
Worker Deployment Version.
Deprecated. Use parent_versioning_info.
parentWorkflowExecution
• Optional parentWorkflowExecution: null | $Properties
Contains information about parent workflow execution that initiated the child workflow these attributes belong to. If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated.
parentWorkflowNamespace
• parentWorkflowNamespace: string
If this workflow is a child, the namespace our parent lives in.
SDKs and UI tools should use parent_workflow_namespace field but server must use parent_workflow_namespace_id only.
parentWorkflowNamespaceId
• parentWorkflowNamespaceId: string
WorkflowExecutionStartedEventAttributes parentWorkflowNamespaceId.
prevAutoResetPoints
• Optional prevAutoResetPoints: null | $Properties
WorkflowExecutionStartedEventAttributes prevAutoResetPoints.
priority
• Optional priority: null | $Properties
Priority metadata
retryPolicy
• Optional retryPolicy: null | $Properties
WorkflowExecutionStartedEventAttributes retryPolicy.
rootWorkflowExecution
• Optional rootWorkflowExecution: null | $Properties
Contains information about the root workflow execution. The root workflow execution is defined as follows:
- A workflow without parent workflow is its own root workflow.
- A workflow that has a parent workflow has the same root workflow as its parent workflow. When the workflow is its own root workflow, then root_workflow_execution is nil. Note: workflows continued as new or reseted may or may not have parents, check examples below.
Examples: Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.
- The root workflow of all three workflows is W1.
- W1 has root_workflow_execution set to nil.
- W2 and W3 have root_workflow_execution set to W1. Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.
- The root workflow of all three workflows is W1.
- W1 has root_workflow_execution set to nil.
- W2 and W3 have root_workflow_execution set to W1. Scenario 3: Workflow W1 continued as new W2.
- The root workflow of W1 is W1 and the root workflow of W2 is W2.
- W1 and W2 have root_workflow_execution set to nil. Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3
- The root workflow of all three workflows is W1.
- W1 has root_workflow_execution set to nil.
- W2 and W3 have root_workflow_execution set to W1. Scenario 5: Workflow W1 is reseted, creating W2.
- The root workflow of W1 is W1 and the root workflow of W2 is W2.
- W1 and W2 have root_workflow_execution set to nil.
searchAttributes
• Optional searchAttributes: null | $Properties
WorkflowExecutionStartedEventAttributes searchAttributes.
sourceVersionStamp
• Optional sourceVersionStamp: null | $Properties
If this workflow intends to use anything other than the current overall default version for the queue, then we include it here. Deprecated. [cleanup-experimental-wv]
taskQueue
• Optional taskQueue: null | $Properties
WorkflowExecutionStartedEventAttributes taskQueue.
timeSkippingConfig
• Optional timeSkippingConfig: null | $Properties
Initial time-skipping configuration for this workflow execution, recorded at start time. This may have been set explicitly via the start workflow request, or propagated from a parent/previous execution.
The configuration may be updated after start via UpdateWorkflowExecutionOptions, which will be reflected in the WorkflowExecutionOptionsUpdatedEvent.
timeSkippingStatePropagation
• Optional timeSkippingStatePropagation: null | $Properties
The time-skipping state propagated from a previous run of this workflow. This can be nil if no time skipping has occurred or there is no previous run.
versioningOverride
• Optional versioningOverride: null | $Properties
Versioning override applied to this workflow when it was started. Children, crons, retries, and continue-as-new will inherit source run's override if pinned and if the new workflow's Task Queue belongs to the override version.
workflowExecutionExpirationTime
• Optional workflowExecutionExpirationTime: null | $Properties
The absolute time at which the workflow will be timed out. This is passed without change to the next run/retry of a workflow.
workflowExecutionTimeout
• Optional workflowExecutionTimeout: null | $Properties
Total workflow execution timeout including retries and continue as new.
workflowId
• workflowId: string
This field is new in 1.21.
workflowRunTimeout
• Optional workflowRunTimeout: null | $Properties
Timeout of a single workflow run.
workflowTaskTimeout
• Optional workflowTaskTimeout: null | $Properties
Timeout of a single workflow task.
workflowType
• Optional workflowType: null | $Properties
WorkflowExecutionStartedEventAttributes workflowType.
Methods
toJSON
▸ toJSON(): Object
Converts this WorkflowExecutionStartedEventAttributes to JSON.
Returns
Object
JSON object
create
▸ create(properties?): WorkflowExecutionStartedEventAttributes & $Shape
Creates a new WorkflowExecutionStartedEventAttributes instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Shape | Properties to set |
Returns
WorkflowExecutionStartedEventAttributes & $Shape
WorkflowExecutionStartedEventAttributes instance
▸ create(properties?): WorkflowExecutionStartedEventAttributes
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
WorkflowExecutionStartedEventAttributes
decode
▸ decode(reader, length?): WorkflowExecutionStartedEventAttributes & $Shape
Decodes a WorkflowExecutionStartedEventAttributes message from the specified reader or buffer.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
WorkflowExecutionStartedEventAttributes & $Shape
WorkflowExecutionStartedEventAttributes
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): WorkflowExecutionStartedEventAttributes & $Shape
Decodes a WorkflowExecutionStartedEventAttributes message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
WorkflowExecutionStartedEventAttributes & $Shape
WorkflowExecutionStartedEventAttributes
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode
▸ encode(message, writer?): Writer
Encodes the specified WorkflowExecutionStartedEventAttributes message. Does not implicitly temporal.api.history.v1.WorkflowExecutionStartedEventAttributes.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | WorkflowExecutionStartedEventAttributes message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified WorkflowExecutionStartedEventAttributes message, length delimited. Does not implicitly temporal.api.history.v1.WorkflowExecutionStartedEventAttributes.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | WorkflowExecutionStartedEventAttributes message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): WorkflowExecutionStartedEventAttributes
Creates a WorkflowExecutionStartedEventAttributes message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
WorkflowExecutionStartedEventAttributes
WorkflowExecutionStartedEventAttributes
toObject
▸ toObject(message, options?): Object
Creates a plain object from a WorkflowExecutionStartedEventAttributes message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | WorkflowExecutionStartedEventAttributes | WorkflowExecutionStartedEventAttributes |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object