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.
22 23 24 |
# File 'lib/temporalio/client/workflow_execution.rb', line 22 def close_time @raw_info.close_time&.to_time end |
#execution_time ⇒ Time?
Returns When this workflow run started or should start.
27 28 29 |
# File 'lib/temporalio/client/workflow_execution.rb', line 27 def execution_time @raw_info.execution_time&.to_time end |
#history_length ⇒ Integer
Returns Number of events in the history.
32 33 34 |
# File 'lib/temporalio/client/workflow_execution.rb', line 32 def history_length @raw_info.history_length end |
#id ⇒ String
Returns ID for the workflow.
37 38 39 |
# File 'lib/temporalio/client/workflow_execution.rb', line 37 def id @raw_info.execution.workflow_id end |
#memo ⇒ Hash<String, Object>?
Returns Memo for the workflow.
42 43 44 45 |
# File 'lib/temporalio/client/workflow_execution.rb', line 42 def memo @memo = Internal::ProtoUtils.memo_from_proto(@raw_info.memo, @data_converter) unless defined?(@memo) @memo 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 66 67 68 |
# File 'lib/temporalio/client/workflow_execution.rb', line 63 def search_attributes unless defined?(@search_attributes) @search_attributes = SearchAttributes.from_proto(@raw_info.search_attributes) end @search_attributes end |
#start_time ⇒ Time
Returns When the workflow was created.
71 72 73 |
# File 'lib/temporalio/client/workflow_execution.rb', line 71 def start_time @raw_info.start_time.to_time end |
#status ⇒ WorkflowExecutionStatus
Returns Status for the workflow.
76 77 78 |
# File 'lib/temporalio/client/workflow_execution.rb', line 76 def status Internal::ProtoUtils.enum_to_int(Api::Enums::V1::WorkflowExecutionStatus, @raw_info.status) end |
#task_queue ⇒ String
Returns Task queue for the workflow.
81 82 83 |
# File 'lib/temporalio/client/workflow_execution.rb', line 81 def task_queue @raw_info.task_queue end |
#workflow_type ⇒ String
Returns Type name for the workflow.
86 87 88 |
# File 'lib/temporalio/client/workflow_execution.rb', line 86 def workflow_type @raw_info.type.name end |