Class: Floe::Workflow::States::Succeed

Inherits:
Floe::Workflow::State show all
Defined in:
lib/floe/workflow/states/succeed.rb

Instance Attribute Summary collapse

Attributes inherited from Floe::Workflow::State

#comment, #name, #payload, #type

Instance Method Summary collapse

Methods inherited from Floe::Workflow::State

build!, #finished?, #long_name, #mark_error, #mark_finished, #mark_started, #ready?, #run_nonblock!, #short_name, #start, #started?, #wait, #wait_until, #waiting?

Methods included from ValidationMixin

included, #invalid_field_error!, #missing_field_error!, #parser_error!, #runtime_field_error!, #workflow_state?, #wrap_parser_error

Constructor Details

#initialize(workflow, name, payload) ⇒ Succeed

Returns a new instance of Succeed.



9
10
11
12
13
14
# File 'lib/floe/workflow/states/succeed.rb', line 9

def initialize(workflow, name, payload)
  super

  @input_path  = Path.new(payload.fetch("InputPath", "$"))
  @output_path = Path.new(payload.fetch("OutputPath", "$"))
end

Instance Attribute Details

#input_pathObject (readonly)

Returns the value of attribute input_path.



7
8
9
# File 'lib/floe/workflow/states/succeed.rb', line 7

def input_path
  @input_path
end

#output_pathObject (readonly)

Returns the value of attribute output_path.



7
8
9
# File 'lib/floe/workflow/states/succeed.rb', line 7

def output_path
  @output_path
end

Instance Method Details

#end?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/floe/workflow/states/succeed.rb', line 28

def end?
  true
end

#finish(context) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/floe/workflow/states/succeed.rb', line 16

def finish(context)
  input              = input_path.value(context, context.input)
  context.output     = output_path.value(context, input)
  context.next_state = nil

  super
end

#running?(_) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/floe/workflow/states/succeed.rb', line 24

def running?(_)
  false
end