Class: Cadence::Metadata::Workflow

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#activity?, #decision?

Constructor Details

#initialize(name:, run_id:, attempt:, timeouts:, headers: {}) ⇒ Workflow

Returns a new instance of Workflow.



8
9
10
11
12
13
14
15
16
# File 'lib/cadence/metadata/workflow.rb', line 8

def initialize(name:, run_id:, attempt:, timeouts:, headers: {})
  @name = name
  @run_id = run_id
  @attempt = attempt
  @headers = headers
  @timeouts = timeouts

  freeze
end

Instance Attribute Details

#attemptObject (readonly)

Returns the value of attribute attempt.



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

def attempt
  @attempt
end

#headersObject (readonly)

Returns the value of attribute headers.



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

def headers
  @headers
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#run_idObject (readonly)

Returns the value of attribute run_id.



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

def run_id
  @run_id
end

#timeoutsObject (readonly)

Returns the value of attribute timeouts.



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

def timeouts
  @timeouts
end

Instance Method Details

#workflow?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/cadence/metadata/workflow.rb', line 18

def workflow?
  true
end