Module: Floe::Workflow::States::NonTerminalMixin
- Defined in:
- lib/floe/workflow/states/non_terminal_mixin.rb
Instance Method Summary collapse
Instance Method Details
#finish(context) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/floe/workflow/states/non_terminal_mixin.rb', line 7 def finish(context) # If this state is failed or this is an end state, next_state to nil context.next_state ||= end? || context.failed? ? nil : @next super end |
#validate_state_next!(workflow) ⇒ Object
14 15 16 17 |
# File 'lib/floe/workflow/states/non_terminal_mixin.rb', line 14 def validate_state_next!(workflow) missing_field_error!("Next") if @next.nil? && !@end invalid_field_error!("Next", @next, "is not found in \"States\"") if @next && !workflow_state?(@next, workflow) end |