Sha256: 6bf2711872b0b66e0bce21d61e6959080ece25e0fbc086483f46f5d9ea82967e

Contents?: true

Size: 1000 Bytes

Versions: 33

Compression:

Stored size: 1000 Bytes

Contents

module Dynflow
  # for cases the serialized action was renamed and it's not available
  # in the code base anymore.
  class Action::Missing < Dynflow::Action

    def self.generate(action_name)
      Class.new(self).tap do |klass|
        klass.singleton_class.send(:define_method, :name) do
          action_name
        end
      end
    end

    def plan(*args)
      raise StandardError,
            "The action class was not found and therefore plan phase failed, this can happen if the action was added/renamed but the executor was not restarted."
    end

    def run
      raise StandardError,
            "The action class was not found and therefore run phase failed, this can happen if the action was added/renamed but the executor was not restarted."
    end

    def finalize
      raise StandardError,
            "The action class was not found and therefore finalize phase failed, this can happen if the action was added/renamed but the executor was not restarted."
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dynflow-1.3.0 lib/dynflow/action/missing.rb
dynflow-1.2.3 lib/dynflow/action/missing.rb
dynflow-1.2.2 lib/dynflow/action/missing.rb
dynflow-1.2.1 lib/dynflow/action/missing.rb
dynflow-1.2.0 lib/dynflow/action/missing.rb
dynflow-1.2.0.pre1 lib/dynflow/action/missing.rb
dynflow-1.1.6 lib/dynflow/action/missing.rb
dynflow-1.1.5 lib/dynflow/action/missing.rb
dynflow-1.1.4 lib/dynflow/action/missing.rb
dynflow-1.1.3 lib/dynflow/action/missing.rb
dynflow-1.1.2 lib/dynflow/action/missing.rb
dynflow-1.1.1 lib/dynflow/action/missing.rb
dynflow-1.1.0 lib/dynflow/action/missing.rb
dynflow-1.0.5 lib/dynflow/action/missing.rb
dynflow-1.0.4 lib/dynflow/action/missing.rb
dynflow-1.0.3 lib/dynflow/action/missing.rb
dynflow-1.0.2 lib/dynflow/action/missing.rb
dynflow-1.0.1 lib/dynflow/action/missing.rb
dynflow-1.0.0 lib/dynflow/action/missing.rb
dynflow-0.8.37 lib/dynflow/action/missing.rb