lib/dynflow/execution_plan.rb
def run_hooks(state)
      records = persistence.load_actions_attributes(@id, [:id, :class]).select do |action|
        Utils.constantize(action[:class])
             .execution_plan_hooks
             .on(state).any?
      end
      action_ids = records.compact.map { |record| record[:id] }
      return if action_ids.empty?
      persistence.load_actions(self, action_ids).each do |action|
        world.middleware.execute(:hook, action, self) do
          action.class.execution_plan_hooks.run(self, action, state)
        end
      end
    end
# a fallback object representing a plan with some corrupted data,
# preventing to load the whole plan properly, this can be used for presenting
# at least some data and not running into internal server errors
a fallback object representing a plan with some corrupted data,
preventing to load the whole plan properly, this can be used for presenting
at least some data and not running into internal server errors
a fallback object representing a plan with some corrupted data preventing to load the whole plan properly this can be used for presenting at least some data and not running into internal server errors
def run_hooks(state)
      records = persistence.load_actions_attributes(@id, [:id, :class]).select do |action|
        Utils.constantize(action[:class])
             .execution_plan_hooks
             .on(state).any?
      end
      action_ids = records.compact.map { |record| record[:id] }
      return if action_ids.empty?
      persistence.load_actions(self, action_ids).each do |action|
        world.middleware.execute(:hook, action, self) do
          action.class.execution_plan_hooks.run(self, action, state)
        end
      end
    end
def run_hooks ( state ) records = persistence . load_actions_attributes ( @id , [ :id , :class ] ) . select do | action | Utils . constantize ( action [ :class ] ) . execution_plan_hooks . on ( state ) . any? end action_ids = records . compact . map { | record | record [ :id ] } return if action_ids . empty? persistence . load_actions ( self , action_ids ) . each do | action | world . middleware . execute ( :hook , action , self ) do action . class . execution_plan_hooks . run ( self , action , state ) end end end
a fallback object representing a plan with some corrupted data,
preventing to load the whole plan properly, this can be used for presenting
at least some data and not running into internal server errors
a fallback object representing a plan with some corrupted data preventing to load the whole plan properly this can be used for presenting at least some data and not running into internal server errors
state