lib/floe/workflow/states/pass.rb in floe-0.2.3 vs lib/floe/workflow/states/pass.rb in floe-0.3.0

- old
+ new

@@ -8,10 +8,11 @@ def initialize(workflow, name, payload) super @next = payload["Next"] + @end = !!payload["End"] @result = payload["Result"] @parameters = PayloadTemplate.new(payload["Parameters"]) if payload["Parameters"] @input_path = Path.new(payload.fetch("InputPath", "$")) @output_path = Path.new(payload.fetch("OutputPath", "$")) @@ -21,10 +22,18 @@ def run!(input) output = input_path.value(context, input) output = result_path.set(output, result) if result && result_path output = output_path.value(context, output) - [@next, output] + [@end ? nil : @next, output] + end + + def status + @end ? "success" : "running" + end + + def end? + @end end end end end end