lib/floe/workflow/states/wait.rb in floe-0.11.0 vs lib/floe/workflow/states/wait.rb in floe-0.11.3

- old
+ new

@@ -21,41 +21,42 @@ @seconds_path = Path.new(payload["SecondsPath"]) if payload.key?("SecondsPath") @input_path = Path.new(payload.fetch("InputPath", "$")) @output_path = Path.new(payload.fetch("OutputPath", "$")) - validate_state! + validate_state!(workflow) end - def start(input) + def start(context) super input = input_path.value(context, context.input) wait_until!( + context, :seconds => seconds_path ? seconds_path.value(context, input).to_i : seconds, :time => timestamp_path ? timestamp_path.value(context, input) : timestamp ) end - def finish + def finish(context) input = input_path.value(context, context.input) context.output = output_path.value(context, input) super end - def running? - waiting? + def running?(context) + waiting?(context) end def end? @end end private - def validate_state! - validate_state_next! + def validate_state!(workflow) + validate_state_next!(workflow) end end end end end