Sha256: a2c69963731fa1b773d978b1bf92170f8119c6a539bb1793826d199bf9291880

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

# frozen_string_literal: true

module Floe
  class Workflow
    module States
      module NonTerminalMixin
        def validate_state_next!
          raise Floe::InvalidWorkflowError, "Missing \"Next\" field in state [#{name}]" if @next.nil? && !@end
          raise Floe::InvalidWorkflowError, "\"Next\" [#{@next}] not in \"States\" for state [#{name}]" if @next && !workflow.payload["States"].key?(@next)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
floe-0.7.1 lib/floe/workflow/states/non_terminal_mixin.rb
floe-0.8.0 lib/floe/workflow/states/non_terminal_mixin.rb
floe-0.7.0 lib/floe/workflow/states/non_terminal_mixin.rb
floe-0.6.1 lib/floe/workflow/states/non_terminal_mixin.rb
floe-0.6.0 lib/floe/workflow/states/non_terminal_mixin.rb