class Dynflow::ExecutionPlan::Steps::RunStep
Public Class Methods
state_transitions()
click to toggle source
# File lib/dynflow/execution_plan/steps/run_step.rb, line 5 def self.state_transitions @state_transitions ||= { pending: [:running, :skipped, :error], # :skipped when it cannot be run because it depends on skipping step running: [:success, :error, :suspended], success: [:suspended], # after not-done process_update suspended: [:running, :error], # process_update, e.g. error in setup_progress_updates skipping: [:error, :skipped], # waiting for the skip method to be called skipped: [], error: [:skipping, :running] } end
Public Instance Methods
cancellable?()
click to toggle source
# File lib/dynflow/execution_plan/steps/run_step.rb, line 26 def cancellable? [:suspended, :running].include?(self.state) && self.action_class < Action::Cancellable end
mark_to_skip()
click to toggle source
# File lib/dynflow/execution_plan/steps/run_step.rb, line 35 def mark_to_skip case self.state when :error self.state = :skipping when :pending self.state = :skipped else raise "Skipping step in #{self.state} is not supported" end self.save end
phase()
click to toggle source
# File lib/dynflow/execution_plan/steps/run_step.rb, line 22 def phase Action::Run end
update_from_action(action)
click to toggle source
Calls superclass method
Dynflow::ExecutionPlan::Steps::AbstractFlowStep#update_from_action
# File lib/dynflow/execution_plan/steps/run_step.rb, line 17 def update_from_action(action) super self.progress_weight = action.run_progress_weight end
with_sub_plans?()
click to toggle source
# File lib/dynflow/execution_plan/steps/run_step.rb, line 31 def with_sub_plans? self.action_class < Action::WithSubPlans end