Sha256: 3ae4c0f9f04777347c5064b808c68a0fec288f733a39778e232faaee1b9a0b21

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

module Floe
  class Workflow
    module States
      class Fail < Floe::Workflow::State
        attr_reader :cause, :error

        def initialize(workflow, name, payload)
          super

          @cause = payload["Cause"]
          @error = payload["Error"]
        end

        def start(input)
          super
          context.state["Error"] = error
          context.state["Cause"] = cause
          context.next_state     = nil
          context.output         = input
        end

        def running?
          false
        end

        def end?
          true
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
floe-0.4.0 lib/floe/workflow/states/fail.rb