Class: Dynflow::Action::Missing

Inherits:
Dynflow::Action show all
Defined in:
lib/dynflow/action/missing.rb

Overview

for cases the serialized action was renamed and it’s not available in the code base anymore.

Constant Summary

Constants inherited from Dynflow::Action

DelayedEvent, ERROR, OutputReference, SUSPEND, Skip

Constants included from Rescue

Rescue::Strategy, Rescue::SuggestedStrategy

Constants inherited from Serializable

Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT

Instance Attribute Summary

Attributes inherited from Dynflow::Action

#caller_action_id, #caller_execution_plan_id, #execution_plan_id, #finalize_step_id, #id, #input, #pending_output_chunks, #phase, #plan_step_id, #run_step_id, #world

Attributes included from Progress

#calculated_progress

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Dynflow::Action

#action_logger, all_children, #all_planned_actions, #caller_action, children, constantize, #delayed_events, #drop_output_chunks!, #error, #execute, #execute_delay, #execution_plan, execution_plan_hooks, #finalize_step, #from_subscription?, #holds_singleton_lock?, #humanized_state, inherit_execution_plan_hooks, inherited, #initialize, #label, middleware, #output, #output=, #output_chunk, #phase!, #phase?, #plan_event, #plan_step, #planned_actions, #queue, #required_step_ids, #run_step, #serializer, #set_plan_context, #state, #steps, #stored_output_chunks, subscribe, #to_hash, #triggering_action

Methods included from Format

#input_format, #output_format

Methods included from Rescue

#combine_suggested_strategies, #rescue_strategy, #rescue_strategy_for_planned_action, #rescue_strategy_for_self

Methods included from Progress

#finalize_progress, #finalize_progress_weight, #run_progress, #run_progress_weight

Methods inherited from Serializable

constantize, from_hash, new_from_hash, #to_hash

Constructor Details

This class inherits a constructor from Dynflow::Action

Class Method Details

.generate(action_name) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/dynflow/action/missing.rb', line 7

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

Instance Method Details

#finalizeObject

Raises:

  • (StandardError)


25
26
27
28
# File 'lib/dynflow/action/missing.rb', line 25

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

#plan(*args) ⇒ Object

Raises:

  • (StandardError)


15
16
17
18
# File 'lib/dynflow/action/missing.rb', line 15

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

#runObject

Raises:

  • (StandardError)


20
21
22
23
# File 'lib/dynflow/action/missing.rb', line 20

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