Class: Temporal::Metadata::WorkflowTask
- Defined in:
- lib/temporal/metadata/workflow_task.rb
Instance Attribute Summary collapse
-
#attempt ⇒ Object
readonly
Returns the value of attribute attempt.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#task_token ⇒ Object
readonly
Returns the value of attribute task_token.
-
#workflow_id ⇒ Object
readonly
Returns the value of attribute workflow_id.
-
#workflow_name ⇒ Object
readonly
Returns the value of attribute workflow_name.
-
#workflow_run_id ⇒ Object
readonly
Returns the value of attribute workflow_run_id.
Instance Method Summary collapse
-
#initialize(namespace:, id:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:) ⇒ WorkflowTask
constructor
A new instance of WorkflowTask.
- #to_h ⇒ Object
- #workflow_task? ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(namespace:, id:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:) ⇒ WorkflowTask
Returns a new instance of WorkflowTask.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/temporal/metadata/workflow_task.rb', line 8 def initialize(namespace:, id:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:) @namespace = namespace @id = id @task_token = task_token @attempt = attempt @workflow_run_id = workflow_run_id @workflow_id = workflow_id @workflow_name = workflow_name freeze end |
Instance Attribute Details
#attempt ⇒ Object (readonly)
Returns the value of attribute attempt.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def attempt @attempt end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def id @id end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def namespace @namespace end |
#task_token ⇒ Object (readonly)
Returns the value of attribute task_token.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def task_token @task_token end |
#workflow_id ⇒ Object (readonly)
Returns the value of attribute workflow_id.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def workflow_id @workflow_id end |
#workflow_name ⇒ Object (readonly)
Returns the value of attribute workflow_name.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def workflow_name @workflow_name end |
#workflow_run_id ⇒ Object (readonly)
Returns the value of attribute workflow_run_id.
6 7 8 |
# File 'lib/temporal/metadata/workflow_task.rb', line 6 def workflow_run_id @workflow_run_id end |
Instance Method Details
#to_h ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/temporal/metadata/workflow_task.rb', line 24 def to_h { 'namespace' => namespace, 'workflow_task_id' => id, 'workflow_name' => workflow_name, 'workflow_id' => workflow_id, 'workflow_run_id' => workflow_run_id, 'attempt' => attempt } end |
#workflow_task? ⇒ Boolean
20 21 22 |
# File 'lib/temporal/metadata/workflow_task.rb', line 20 def workflow_task? true end |