Temporal Events reference
Events are created by the Temporal Service in response to external occurrences and Commands generated by a Workflow Execution. All possible Events that could appear in a Workflow Execution Event History are listed below.
WorkflowExecutionStarted
This is always the first Event in a Workflow Execution Event History. It indicates that the Temporal Service received a request to spawn the Workflow Execution.
Field | Description |
---|---|
workflow_type | The Name of Workflow that was initiated. |
parent_workflow_namespace | The Namespace of the Parent Workflow Execution, if applicable. |
parent_workflow_execution | Identifies the parent Workflow and the execution run. |
parent_initiated_event_id | Id of the StartWorkflowExecutionInitiated Event this Event corresponds to. |
task_queue | The Task Queue that this Workflow Task was enqueued in. |
input | Information that is deserialized by the SDK to provide arguments to the Workflow. |
workflow_execution_timeout | The total timeout period for a Workflow Execution, including retries and continue-as-new. |
workflow_run_timeout | Timeout of a single Workflow run. |
workflow_task_timeout | Timeout of a single Workflow Task. |
continued_execution_run_id | Run Id of the previous Workflow which continued-as-new, retried or was executed by Cron into this Workflow. |
initiator | Allows the Workflow to continue as a new Workflow Execution. |
continued_failure | Serialized result of a failure. |
last_completion_result | Information from the previously completed Task, if applicable. |
original_execution_run_id | The Run Id of the original Workflow started. |
identity | The Id of the Client or parent Workflow Worker that requested the start of this Workflow. |
first_execution_run_id | The first Run Id, along the chain of Continue-As-New Runs and Reset. |
retry_policy | The amount of retries as determined by the service's dynamic configuration. Retries will happen until 'schedule_to_close_timeout' is reached. |
attempt | The number of attempts that have been made to complete this Task. |
workflow_execution_expiration_time | The absolute time at which the Workflow Execution will time out. |
cron_schedule | Displays the Workflow's Cron Schedule, if applicable. |
first_workflow_task_backoff | Contains the amount of time between when this iteration of the Workflow was scheduled, and when it should run next. Applies to Cron Scheduling. |
memo | Non-indexed information to show in the Workflow. |
search_attributes | Provides data for setting up a Workflow's Search Attributes. |
prev_auto_reset_points | |
header | Information passed by the sender of the Signal that is copied into the Workflow Task. |
WorkflowExecutionCompleted
This indicates that the Workflow Execution has successfully completed. The Event contains Workflow Execution results.
Field | Description |
---|---|
result | Serialized result of completed Workflow. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
new_execution_run_id | The Run Id of the new Workflow Execution started as a result of a Cron Schedule. |
WorkflowExecutionFailed
This Event indicates that the Workflow Execution has unsuccessfully completed and contains the Workflow Execution error.
Field | Description |
---|---|
failure | Serialized result of a Workflow failure. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
workflow_task_completed_event_id | The Run Id of the WorkflowTaskCompleted that the Event was reported with. |
new_execution_run_id | The Run Id of the new Workflow started by Cron or Retry. |
WorkflowExecutionTimedOut
This Event type indicates that the Workflow Execution has timed out by the Temporal Server due to the Workflow having not been completed within timeout settings.
Field | Description |
---|---|
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
new_execution_run_id | The Run Id of the new Workflow started by Cron or Retry. |
WorkflowExecutionCancelRequested
This Event type indicates that a request has been made to cancel the Workflow Execution.
Field | Description |
---|---|
cause | The user-provided reason for the cancelation request. |
external_initiated_event_id | The Run Id of the Event in the Workflow that requested cancelation, if applicable. |
external_workflow_execution | Identifies the external Workflow and the run of the its execution. |
identity | Id of the Worker that requested cancelation. |
WorkflowExecutionCanceled
This Event type indicates that the client has confirmed the cancelation request and the Workflow Execution has been canceled.
Field | Description |
---|---|
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
details | Additional information reported by the Workflow upon cancelation. |
WorkflowExecutionSignaled
This Event type indicates the Workflow has received a Signal Event. The Event type contains the Signal name, as well as a Signal payload.
Field | Description |
---|---|
signal_name | The name/type of Signal to be fired. |
input | Information that is deserialized by the SDK to provide arguments to the Workflow function. |
identity | Identifies the Worker that signaled to the Workflow. |
header | Information passed by the sender of the Signal that is copied into the Workflow Task. |
WorkflowExecutionTerminated
This Event type indicates that the Workflow Execution has been forcefully terminated and that likely the terminate Workflow API was called.
Field | Description |
---|---|
reason | Information provided by the user or client for Workflow termination. |
details | Additional information reported by the Workflow upon termination. |
identity | Identifies the Worker that requested termination. |
WorkflowExecutionContinuedAsNew
This Event type indicates that the Workflow has successfully completed, and a new Workflow has been started within the same transaction. This Event type contains last Workflow Execution results as well as new Workflow Execution inputs.
Field | Description |
---|---|
new_execution_run_id | The Run Id of the new Workflow started by this Continue-As-New Event. |
workflow_type | The name/type of Workflow that was started by this Event. |
task_queue | The Task Queue that this Workflow Task was enqueued in. |
input | Information that is deserialized by the SDK to provide arguments to the Workflow. |
workflow_run_timeout | Timeout of a single Workflow run. |
workflow_task_timeout | Timeout of a single Workflow Task. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event command was reported with. |
backoff_start_interval | The amount of time to delay the beginning of the ContinuedAsNew Workflow. |
initiator | Allows the Workflow to continue as a new execution. |
last_completion_result | Information passed by the previously completed Task to the ongoing execution. |
header | Information passed by the sender of the Signal that is copied into the Workflow Task. |
memo | Non-indexed information to show in the Workflow. |
search_attributes | Provides data for setting up a Workflow's Search Attributes. |
WorkflowTaskScheduled
This Event type indicates that the Workflow Task has been scheduled. The SDK client should now be able to process any new history events.
Field | Description |
---|---|
task_queue | The Task Queue that this Workflow Task was enqueued in. |
start_to_close_timeout | The time that the Worker takes to process this Task once it's received. |
attempt | The number of attempts that have been made to complete this Task. |
WorkflowTaskStarted
This Event type indicates that the Workflow Task has started. The SDK client has picked up the Workflow Task and is processing new history events.
Field | Description |
---|---|
scheduled_event_id | The Id of the WorkflowTaskScheduled Event that this Workflow Task corresponds to. |
identity | Identifies the Worker that started this Task. |
request_id | Identifies the Workflow Task request. |
WorkflowTaskCompleted
This Event type indicates that the Workflow Task completed.
Field | Description |
---|---|
scheduled_event_id | The Id of the WorkflowTaskScheduled Event that this Workflow Task corresponds to. |
started_event_id | The Id of the WorkflowTaskStarted Event that this Task corresponds to. |
identity | Identity of the Worker that completed this Task. |
binary_checksum | Binary Id of the Worker that completed this Task. |
The SDK client picked up the Workflow Task, processed new history events, and may or may not ask the Temporal Server to do additional work. It is possible for the following events to still occur:
- ActivityTaskScheduled
- TimerStarted
- UpsertWorkflowSearchAttributes
- MarkerRecorded
- StartChildWorkflowExecutionInitiated
- RequestCancelExternalWorkflowExecutionInitiated
- SignalExternalWorkflowExecutionInitiated
- WorkflowExecutionCompleted
- WorkflowExecutionFailed
- WorkflowExecutionCanceled
- WorkflowExecutionContinuedAsNew
WorkflowTaskTimedOut
This Event type indicates that the Workflow Task encountered a timeout. Either an SDK client with a local cache was not available at the time, or it took too long for the SDK client to process the Task.
Field | Description |
---|---|
scheduled_event_id | The Id of the WorkflowTaskScheduled Event that this Workflow Task corresponds to. |
started_event_id | The Id of the WorkflowTaskStarted Event that this Task corresponds to. |
timeout_type | The type of timeout that has occurred. |
WorkflowTaskFailed
This Event type indicates that the Workflow Task encountered a failure. Usually this means that the Workflow was non-deterministic. However, the Workflow reset functionality also uses this Event.
Field | Description |
---|---|
scheduled_event_id | The Id of the WorkflowTaskScheduled Event that this Workflow Task corresponds to. |
started_event_id | The Id of the WorkflowTaskStarted Event that this Workflow Task corresponds to. |
failure | Details for the Workflow Task's failure. |
identity | The identity of the Worker that failed this Task. The Worker must be explicitly defined to return a value for this field. |
base_run_id | The original Run Id of the Workflow. |
new_run_id | The Run Id of the reset Workflow. |
fork_event_version | Identifies the Event version that was forked off to the reset Workflow. |
binary_checksum | The Binary Id of the Worker that failed this Task. The Worker must be explicitly defined to return a value for this field. |
ActivityTaskScheduled
This Event type indicates that an Activity Task was scheduled. The SDK client should pick up this Activity Task and execute. This Event type contains Activity inputs, as well as Activity Timeout configurations.
Field | Description |
---|---|
activity_id | The identifier assigned to this Activity by a Worker or user. |
activity_type | The type of Activity that was scheduled. |
namespace | Namespace of the Workflow that the Activity resides in. |
task_queue | The Task Queue that this Activity Task was enqueued in. |
header | Information passed by the sender of the Signal that is copied into the Workflow Task. |
input | Information that is deserialized by the SDK to provide arguments to the Workflow function. |
schedule_to_close_timeout | The amount of time that a caller will wait for Activity completion. Limits the amount of time that retries will be attempted for this Activity. |
schedule_to_start_timeout | Limits the time that an Activity Task can stay in a Task Queue. This timeout cannot be retried. |
start_to_close_timeout | Maximum amount of execution time that an Activity is allowed after being picked up by a Worker. This timeout is retryable. |
heartbeat_timeout | Maximum amount of time allowed between successful Worker heartbeats. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
retry_policy | The amount of retries as determined by the service's dynamic configuration. Retries will happen until schedule_to_close_timeout is reached. |
ActivityTaskStarted
This Event type indicates that an Activity Task Execution was started. The SDK Worker picked up the Activity Task and started processing the Activity invocation. Note, however, that this Event is not written to History until the terminal Event (like ActivityTaskCompleted or ActivityTaskFailed) occurs.
Field | Description |
---|---|
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this Task corresponds to. |
identity | Identifies the Worker that started the Task. |
request_id | Identifies the Activity Task request. |
attempt | The number of attempts that have been made to complete this Task. |
last_failure | Details from the most recent failure Event. Only assigned values if the Task has previously failed and been retried. |
ActivityTaskCompleted
This Event type indicates that the Activity Task has completed. The SDK client has picked up and successfully completed the Activity Task. This Event type contains Activity Execution results.
Field | Description |
---|---|
result | Serialized result of a completed Activity. |
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this completion Event corresponds to. |
started_event_id | The Id of the ActivityTaskStarted Event that this Task corresponds to. |
identity | Identity of the Worker that completed this Task. |
ActivityTaskFailed
This Event type indicates that the Activity Task has failed. The SDK client picked up the Activity Task but unsuccessfully completed it. This Event type contains Activity Execution errors.
Field | Description |
---|---|
failure | Serialized result of a Workflow failure. |
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this failure Event corresponds to. |
started_event_id | The Id of the ActivityTaskStarted Event that this failure corresponds to. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
ActivityTaskTimedOut
This Event type indicates that the Activity has timed out according to the Temporal Server, due to one of these Activity timeouts: Schedule-to-Close Timeout and Schedule-to-Start Timeout.
Field | Description |
---|---|
failure | Serialized result of a Workflow failure. |
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this timeout Event corresponds to. |
started_event_id | The Id of the ActivityTaskStarted Event that this timeout corresponds to. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
timeout_type | The type of timeout that led to this Event, e.g., Start-to-Close, Schedule-to-Close, Schedule-to-Start. |
You can run a Workflow containing an Activity Execution that takes longer than the Start-to-Close Timeout you set and use a RetryPolicy that sets MaxAttempts to 1 so it does not retry indefinitely.
When the Activity times out, you will observe that the ActivityTaskTimedOut
Event contains other attributes missing from the documentation, including the type of timeout that led to the Event.
ActivityTaskCancelRequested
This Event type indicates that a request to cancel the Activity has occurred.
Field | Description |
---|---|
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this cancel Event corresponds to. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
ActivityTaskCanceled
This Event type indicates that the Activity has been canceled.
Field | Description |
---|---|
details | Additional information reported by the Activity upon confirming cancelation. |
latest_cancel_requested_event_id | Id of the most recent ActivityTaskCancelRequested Event which refers to the same Activity. |
scheduled_event_id | The Id of the ActivityTaskScheduled Event that this cancelation corresponds to. |
started_event_id | The Id of the ActivityTaskStarted Event that this cancelation corresponds to. |
identity | Identifies the Worker that requested cancelation. |
TimerStarted
This Event type indicates a timer has started.
Field | Description |
---|---|
timer_id | The Id assigned for the timer by a Worker or user. |
start_to_fire_timeout | Amount of time to elapse before the timer fires. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
TimerFired
This Event type indicates a timer has fired.
Field | Description |
---|---|
timer_id | The Id assigned for the timer by a Worker or user. |
started_event_id | The Id of the TimerStarted Event itself. |
TimerCanceled
This Event type indicates a Timer has been canceled.
Field | Description |
---|---|
timer_id | The Id assigned for the timer by a Worker or user. |
started_event_id | The Id of the TimerStarted Event itself. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
RequestCancelExternalWorkflowExecutionInitiated
This Event type indicates that a Workflow has requested that the Temporal Server try to cancel another Workflow.
Field | Description |
---|---|
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
namespace | Namespace of the Workflow that`s going to be signaled for execution. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
child_workflow_only | Set to true if this Workflow is a child of the Workflow which issued the cancelation request. |
reason | Information provided by the user or client for Workflow cancelation. |
RequestCancelExternalWorkflowExecutionFailed
This Event type indicates that Temporal Server could not cancel the targeted Workflow. This is usually because the target Workflow could not be found.
Field | Description |
---|---|
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
namespace | Namespace of the Workflow that failed to cancel. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
initiated_event_id | Id of the [RequestCancelExternalWorkflowExecutionInitiated] Event this failure corresponds to. |
ExternalWorkflowExecutionCancelRequested
This Event type indicates that the Temporal Server has successfully requested the cancelation of the target Workflow.
Field | Description |
---|---|
initiated_event_id | Id of the RequestCancelExternalWorkflowExecutionInitiated Event that this cancelation request corresponds to. |
namespace | Namespace of the Workflow that was requested to cancel. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
ExternalWorkflowExecutionSignaled
This Event type indicates that the Temporal Server has successfully Signaled the targeted Workflow.
Field | Description |
---|---|
initiated_event_id | Id of the SignalExternalWorkflowExecutionInitiated Event this Event corresponds to. |
namespace | Namespace of the Workflow that was signaled to. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
MarkerRecorded
This Event type is transparent to the Temporal Server . The Server will only store it and will not try to understand it. The SDK client may use it for local activities or side effects.
Field | Description |
---|---|
marker_name | Identifies various markers. |
details | Serialized information recorded in the marker. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
header | Information passed by the sender of the Signal that is copied into the marker. |
failure | Serialized result of a Workflow failure. |
StartChildWorkflowExecutionInitiated
This Event type indicates that the Temporal Server will try to start a Child Workflow.
Field | Description |
---|---|
namespace | Namespace of the Child Workflow. |
workflow_id | Identifies the Child Workflow. |
workflow_type | The name/type of Workflow that was initiated. |
StartChildWorkflowExecutionFailed
This Event type indicates a Child Workflow Execution cannot be started / triggered. It is usually due to a Child Workflow Id collision.
Field | Description |
---|---|
namespace | Namespace of the Child Workflow. |
workflow_id | Identifies the Child Workflow. |
workflow_type | The name/type of Workflow that has failed. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
ChildWorkflowExecutionStarted
This Event type indicates a Child Workflow Execution has successfully started / triggered. This would also cause the WorkflowExecutionStarted to be recorded for the Workflow that has started.
Field | Description |
---|---|
namespace | Namespace of the Child Workflow. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that has started execution. |
header | Information passed by the sender of the Signal that is copied into the Child Workflow Task. |
ChildWorkflowExecutionCompleted
This Event type indicates that the Child Workflow Execution has successfully completed. This would also cause the WorkflowExecutionCompleted to be recorded for the Workflow that has completed.
Field | Description |
---|---|
result | Serialized result of the completed Child Workflow. |
namespace | Namespace of the completed Child Workflow. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that was completed. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
started_event_id | Id of the ChildWorkflowExecutionStarted Event this Event corresponds to. |
ChildWorkflowExecutionFailed
This Event type indicates that the Child Workflow Execution has unsuccessfully completed. This would also cause the WorkflowExecutionFailed to be recorded for the Workflow that has failed.
Field | Description |
---|---|
failure | Serialized result of a Workflow failure. |
namespace | Namespace of the Child Workflow that failed. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that has failed. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
started_event_id | Id of the ChildWorkflowExecutionStarted Event this failure corresponds to. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
ChildWorkflowExecutionCanceled
This Event type indicates that the Child Workflow Execution has been canceled. This would also cause the WorkflowExecutionCanceled to be recorded for the Workflow that was canceled.
Field | Description |
---|---|
details | Additional information reported by the Child Workflow upon cancelation. |
namespace | Namespace of the Child Workflow that was canceled. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that was canceled. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
started_event_id | Id of the ChildWorkflowExecutionStarted Event this cancelation corresponds to. |
ChildWorkflowExecutionTimedOut
This Event type indicates that the Child Workflow Execution has timed out by the Temporal Server. This would also cause the WorkflowExecutionTimeOut to be recorded for the Workflow that timed out.
Field | Description |
---|---|
namespace | Namespace of the Child Workflow. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that has timed out. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
started_event_id | Id of the ChildWorkflowExecutionStarted Event that this timeout corresponds to. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
ChildWorkflowExecutionTerminated
This Event type indicates that the Child Workflow Execution has been terminated. This would also cause the WorkflowExecutionTerminated to be recorded for the Workflow that was terminated.
Field | Description |
---|---|
namespace | Namespace of the Child Workflow. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
workflow_type | The name/type of Workflow that was terminated. |
initiated_event_id | Id of the StartChildWorkflowExecutionInitiated Event this Event corresponds to. |
started_event_id | Id of the ChildWorkflowExecutionStarted Event that this termination corresponds to. |
retry_state | The reason provided for whether the Task should or shouldn't be retried. |
SignalExternalWorkflowExecutionInitiated
This Event type indicates that the Temporal Server will try to Signal the targeted Workflow. This Event type contains the Signal name, as well as a Signal payload.
Field | Description |
---|---|
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
namespace | Namespace of the Workflow that's to be signaled. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
signal_name | The name/type of Signal to be fired. |
input | Information that is deserialized by the SDK to provide arguments to the Workflow Function. |
child_workflow_only | Set to true if this Workflow is a child of the Workflow which issued the cancelation request. |
header | Information to be passed from the Signal to the targeted Workflow. |
SignalExternalWorkflowExecutionFailed
This Event type indicates that the Temporal Server cannot Signal the targeted Workflow, usually because the Workflow could not be found.
Field | Description |
---|---|
workflow_task_completed_event_id | The Id of the WorkflowTaskCompleted that the Event was reported with. |
namespace | Namespace of the Workflow that failed to execute. |
workflow_execution | Identifies the Workflow and the run of the Workflow Execution. |
initiated_event_id | Id of the RequestCancelExternalWorkflowExecutionInitiated Event this failure signal corresponds to. |
UpsertWorkflowSearchAttributes
This Event type indicates that the Workflow Search Attributes should be updated and synchronized with the visibility store.
Field | Description |
---|---|
workflow_task_completed_event_id | The WorkflowTaskCompleted Event reported the Event with this Id. |
search_attributes | Provides data for setting up a Workflow's Search Attributes. |
WorkflowExecutionUpdateAcceptedEvent
This Event type indicates that a Workflow Execution has accepted an Update for execution. The original request input payload is both indicated and stored by this Event, as it generates no Event when initially requesting an Update.
Field | Description |
---|---|
protocol_instance_id | The instance of the Update protocol with this Id is executing this Update. |
accepted_request_message_id | The Id of the request message sent by Temporal Server to the Worker. |
accepted_request_sequencing_event_id | Execute this Update after the Event with this Id. |
accepted_request | The request input and metadata initially provided by the invoker of the Update and subsequently relayed by Temporal Server to the Worker for acceptance and execution. |
WorkflowExecutionUpdateCompletedEvent
This Event type indicates that a Workflow Execution has executed an Update to completion.
Field | Description |
---|---|
meta | The metadata associated with this Update, sourced from the initial request. |
accepted_event_id | The Id of the WorkflowExecutionUpdateAcceptedEvent The Platform accepted this Update for execution. |
outcome | The outcome of execution of this Update whether the execution resulted in a success or a failure. |