Class: ManageIQ::Floe::Workflow::States::Fail
- Inherits:
-
ManageIQ::Floe::Workflow::State
- Object
- ManageIQ::Floe::Workflow::State
- ManageIQ::Floe::Workflow::States::Fail
- Defined in:
- lib/manageiq/floe/workflow/states/fail.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Attributes inherited from ManageIQ::Floe::Workflow::State
#comment, #name, #payload, #type, #workflow
Instance Method Summary collapse
- #end? ⇒ Boolean
-
#initialize(workflow, name, payload) ⇒ Fail
constructor
A new instance of Fail.
- #run!(input) ⇒ Object
Methods inherited from ManageIQ::Floe::Workflow::State
build!, #context, #to_dot, #to_dot_transitions
Methods included from Logging
Constructor Details
#initialize(workflow, name, payload) ⇒ Fail
Returns a new instance of Fail.
10 11 12 13 14 15 |
# File 'lib/manageiq/floe/workflow/states/fail.rb', line 10 def initialize(workflow, name, payload) super @cause = payload["Cause"] @error = payload["Error"] end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/fail.rb', line 8 def cause @cause end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
8 9 10 |
# File 'lib/manageiq/floe/workflow/states/fail.rb', line 8 def error @error end |
Instance Method Details
#end? ⇒ Boolean
28 29 30 |
# File 'lib/manageiq/floe/workflow/states/fail.rb', line 28 def end? true end |
#run!(input) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/manageiq/floe/workflow/states/fail.rb', line 17 def run!(input) logger.info("Running state: [#{name}] with input [#{input}]") next_state = nil output = input logger.info("Running state: [#{name}] with input [#{input}]...Complete - next state: [#{next_state&.name}]") [next_state, output] end |