Class: ManageIQ::Floe::Workflow::States::Pass
- Inherits:
-
ManageIQ::Floe::Workflow::State
- Object
- ManageIQ::Floe::Workflow::State
- ManageIQ::Floe::Workflow::States::Pass
- Defined in:
- lib/manageiq/floe/workflow/states/pass.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
readonly
Returns the value of attribute end.
-
#input_path ⇒ Object
readonly
Returns the value of attribute input_path.
-
#next ⇒ Object
readonly
Returns the value of attribute next.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#result_path ⇒ Object
readonly
Returns the value of attribute result_path.
Attributes inherited from ManageIQ::Floe::Workflow::State
#comment, #name, #payload, #type, #workflow
Instance Method Summary collapse
-
#initialize(workflow, name, payload) ⇒ Pass
constructor
A new instance of Pass.
- #run! ⇒ Object
Methods inherited from ManageIQ::Floe::Workflow::State
build!, #context, #end?, #to_dot, #to_dot_transitions
Methods included from Logging
Constructor Details
#initialize(workflow, name, payload) ⇒ Pass
Returns a new instance of Pass.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 10 def initialize(workflow, name, payload) super @next = payload["Next"] @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", "$")) @result_path = ReferencePath.new(payload.fetch("ResultPath", "$")) end |
Instance Attribute Details
#end ⇒ Object (readonly)
Returns the value of attribute end.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def end @end end |
#input_path ⇒ Object (readonly)
Returns the value of attribute input_path.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def input_path @input_path end |
#next ⇒ Object (readonly)
Returns the value of attribute next.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def next @next end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def output_path @output_path end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def parameters @parameters end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def result @result end |
#result_path ⇒ Object (readonly)
Returns the value of attribute result_path.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 8 def result_path @result_path end |
Instance Method Details
#run! ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/manageiq/floe/workflow/states/pass.rb', line 22 def run!(*) super do |input| output = input output = result_path.set(output, result) if result && result_path output end end |