Class: Cadence::Metadata::Activity

Inherits:
Base
  • Object
show all
Defined in:
lib/cadence/metadata/activity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#decision?, #workflow?

Constructor Details

#initialize(domain:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, timeouts:, headers: {}) ⇒ Activity

Returns a new instance of Activity.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cadence/metadata/activity.rb', line 8

def initialize(domain:, id:, name:, task_token:, attempt:, workflow_run_id:, workflow_id:, workflow_name:, timeouts:, headers: {})
  @domain = domain
  @id = id
  @name = name
  @task_token = task_token
  @attempt = attempt
  @workflow_run_id = workflow_run_id
  @workflow_id = workflow_id
  @workflow_name = workflow_name
  @timeouts = timeouts
  @headers = headers

  freeze
end

Instance Attribute Details

#attemptObject (readonly)

Returns the value of attribute attempt.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def attempt
  @attempt
end

#domainObject (readonly)

Returns the value of attribute domain.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def domain
  @domain
end

#headersObject (readonly)

Returns the value of attribute headers.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def headers
  @headers
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def name
  @name
end

#task_tokenObject (readonly)

Returns the value of attribute task_token.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def task_token
  @task_token
end

#timeoutsObject (readonly)

Returns the value of attribute timeouts.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def timeouts
  @timeouts
end

#workflow_idObject (readonly)

Returns the value of attribute workflow_id.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def workflow_id
  @workflow_id
end

#workflow_nameObject (readonly)

Returns the value of attribute workflow_name.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def workflow_name
  @workflow_name
end

#workflow_run_idObject (readonly)

Returns the value of attribute workflow_run_id.



6
7
8
# File 'lib/cadence/metadata/activity.rb', line 6

def workflow_run_id
  @workflow_run_id
end

Instance Method Details

#activity?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/cadence/metadata/activity.rb', line 23

def activity?
  true
end