class Temporal::Metadata::Activity

Attributes

attempt[R]
headers[R]
heartbeat_details[R]
id[R]
name[R]
namespace[R]
task_token[R]
workflow_id[R]
workflow_name[R]
workflow_run_id[R]

Public Class Methods

new(namespace:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, headers: {}, heartbeat_details:) click to toggle source
# File lib/temporal/metadata/activity.rb, line 8
def initialize(namespace:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, headers: {}, heartbeat_details:)
  @namespace = namespace
  @id = id
  @name = name
  @task_token = task_token
  @attempt = attempt
  @workflow_run_id = workflow_run_id
  @workflow_id = workflow_id
  @workflow_name = workflow_name
  @headers = headers
  @heartbeat_details = heartbeat_details

  freeze
end

Public Instance Methods

activity?() click to toggle source
# File lib/temporal/metadata/activity.rb, line 23
def activity?
  true
end
to_h() click to toggle source
# File lib/temporal/metadata/activity.rb, line 27
def to_h
  {
    'namespace' => namespace,
    'workflow_id' => workflow_id,
    'workflow_name' => workflow_name,
    'workflow_run_id' => workflow_run_id,
    'activity_id' => id,
    'activity_name' => name,
    'attempt' => attempt
  }
end