Class: Dynflow::ExecutionPlan::Steps::AbstractFlowStep

Inherits:
Abstract show all
Defined in:
lib/dynflow/execution_plan/steps/abstract_flow_step.rb

Direct Known Subclasses

FinalizeStep, RunStep

Instance Attribute Summary

Attributes inherited from Abstract

#action_class, #action_id, #ended_at, #error, #execution_plan_id, #execution_time, #id, #progress_weight, #real_time, #started_at, #state, #world

Attributes included from Stateful

#state

Instance Method Summary collapse

Methods inherited from Abstract

#action, #action_logger, #cancellable?, #default_progress_done, #initialize, #mark_to_skip, #persistence, #phase, #progress_done, #save, #skippable?, states, #to_hash, #to_s

Methods included from Stateful

included, #set_state, #state_transitions, #states

Methods inherited from Serializable

constantize, from_hash, new_from_hash, #to_hash

Constructor Details

This class inherits a constructor from Dynflow::ExecutionPlan::Steps::Abstract

Instance Method Details

#cloneObject



14
15
16
# File 'lib/dynflow/execution_plan/steps/abstract_flow_step.rb', line 14

def clone
  self.class.from_hash(to_hash, execution_plan_id, world)
end

#execute(*args) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/dynflow/execution_plan/steps/abstract_flow_step.rb', line 5

def execute(*args)
  return self if [:skipped, :success].include? self.state
  open_action do |action|
    with_meta_calculation(action) do
      action.execute(*args)
    end
  end
end