lib/floe/workflow/states/succeed.rb in floe-0.11.3 vs lib/floe/workflow/states/succeed.rb in floe-0.12.0
- old
+ new
@@ -4,12 +4,21 @@
class Workflow
module States
class Succeed < Floe::Workflow::State
attr_reader :input_path, :output_path
+ def initialize(workflow, name, payload)
+ super
+
+ @input_path = Path.new(payload.fetch("InputPath", "$"))
+ @output_path = Path.new(payload.fetch("OutputPath", "$"))
+ end
+
def finish(context)
+ input = input_path.value(context, context.input)
+ context.output = output_path.value(context, input)
context.next_state = nil
- context.output = context.input
+
super
end
def running?(_)
false