Class: Temporalio::Client::WorkflowExecution
- Inherits:
-
Object
- Object
- Temporalio::Client::WorkflowExecution
- Defined in:
- lib/temporalio/client/workflow_execution.rb
Overview
Info for a single workflow execution run.
Direct Known Subclasses
Defined Under Namespace
Classes: Description
Instance Attribute Summary collapse
-
#raw_info ⇒ Api::Workflow::V1::WorkflowExecutionInfo
readonly
Underlying protobuf info.
Instance Method Summary collapse
-
#close_time ⇒ Time?
When the workflow was closed if closed.
-
#execution_time ⇒ Time?
When this workflow run started or should start.
-
#history_length ⇒ Integer
Number of events in the history.
-
#id ⇒ String
ID for the workflow.
-
#memo ⇒ Hash<String, Object>?
Memo for the workflow.
-
#parent_id ⇒ String?
ID for the parent workflow if this was started as a child.
-
#parent_run_id ⇒ String?
Run ID for the parent workflow if this was started as a child.
-
#run_id ⇒ String
Run ID for this workflow run.
-
#search_attributes ⇒ SearchAttributes?
Current set of search attributes if any.
-
#start_time ⇒ Time
When the workflow was created.
-
#status ⇒ WorkflowExecutionStatus
Status for the workflow.
-
#task_queue ⇒ String
Task queue for the workflow.
-
#workflow_type ⇒ String
Type name for the workflow.
Instance Attribute Details
#raw_info ⇒ Api::Workflow::V1::WorkflowExecutionInfo (readonly)
Returns Underlying protobuf info.
13 14 15 |
# File 'lib/temporalio/client/workflow_execution.rb', line 13 def raw_info @raw_info end |
Instance Method Details
#close_time ⇒ Time?
Returns When the workflow was closed if closed.
23 24 25 |
# File 'lib/temporalio/client/workflow_execution.rb', line 23 def close_time Internal::ProtoUtils.(@raw_info.close_time) end |
#execution_time ⇒ Time?
Returns When this workflow run started or should start.
28 29 30 |
# File 'lib/temporalio/client/workflow_execution.rb', line 28 def execution_time Internal::ProtoUtils.(@raw_info.execution_time) end |
#history_length ⇒ Integer
Returns Number of events in the history.
33 34 35 |
# File 'lib/temporalio/client/workflow_execution.rb', line 33 def history_length @raw_info.history_length end |
#id ⇒ String
Returns ID for the workflow.
38 39 40 |
# File 'lib/temporalio/client/workflow_execution.rb', line 38 def id @raw_info.execution.workflow_id end |
#memo ⇒ Hash<String, Object>?
Returns Memo for the workflow.
43 44 45 |
# File 'lib/temporalio/client/workflow_execution.rb', line 43 def memo @memo.get end |
#parent_id ⇒ String?
Returns ID for the parent workflow if this was started as a child.
48 49 50 |
# File 'lib/temporalio/client/workflow_execution.rb', line 48 def parent_id @raw_info.parent_execution&.workflow_id end |
#parent_run_id ⇒ String?
Returns Run ID for the parent workflow if this was started as a child.
53 54 55 |
# File 'lib/temporalio/client/workflow_execution.rb', line 53 def parent_run_id @raw_info.parent_execution&.run_id end |
#run_id ⇒ String
Returns Run ID for this workflow run.
58 59 60 |
# File 'lib/temporalio/client/workflow_execution.rb', line 58 def run_id @raw_info.execution.run_id end |
#search_attributes ⇒ SearchAttributes?
Returns Current set of search attributes if any.
63 64 65 |
# File 'lib/temporalio/client/workflow_execution.rb', line 63 def search_attributes @search_attributes.get end |
#start_time ⇒ Time
Returns When the workflow was created.
68 69 70 |
# File 'lib/temporalio/client/workflow_execution.rb', line 68 def start_time Internal::ProtoUtils.(@raw_info.start_time) || raise # Never nil end |
#status ⇒ WorkflowExecutionStatus
Returns Status for the workflow.
73 74 75 |
# File 'lib/temporalio/client/workflow_execution.rb', line 73 def status Internal::ProtoUtils.enum_to_int(Api::Enums::V1::WorkflowExecutionStatus, @raw_info.status) end |
#task_queue ⇒ String
Returns Task queue for the workflow.
78 79 80 |
# File 'lib/temporalio/client/workflow_execution.rb', line 78 def task_queue @raw_info.task_queue end |
#workflow_type ⇒ String
Returns Type name for the workflow.
83 84 85 |
# File 'lib/temporalio/client/workflow_execution.rb', line 83 def workflow_type @raw_info.type.name end |