lib/floe/workflow/states/pass.rb in floe-0.5.0 vs lib/floe/workflow/states/pass.rb in floe-0.6.0
- old
+ new
@@ -2,10 +2,12 @@
module Floe
class Workflow
module States
class Pass < Floe::Workflow::State
+ include NonTerminalMixin
+
attr_reader :end, :next, :result, :parameters, :input_path, :output_path, :result_path
def initialize(workflow, name, payload)
super
@@ -15,10 +17,12 @@
@parameters = PayloadTemplate.new(payload["Parameters"]) if payload["Parameters"]
@input_path = Path.new(payload.fetch("InputPath", "$"))
@output_path = Path.new(payload.fetch("OutputPath", "$"))
@result_path = ReferencePath.new(payload.fetch("ResultPath", "$"))
+
+ validate_state!
end
def start(input)
super
output = input_path.value(context, input)
@@ -33,9 +37,15 @@
false
end
def end?
@end
+ end
+
+ private
+
+ def validate_state!
+ validate_state_next!
end
end
end
end
end