Sha256: f4b9e101782c80efcd09900f09376b87520d5f74d6385bb58e4919fde1fa3f2e

Contents?: true

Size: 817 Bytes

Versions: 25

Compression:

Stored size: 817 Bytes

Contents

# frozen_string_literal: true
module Dynflow
  module ExecutionPlan::Steps
    class FinalizeStep < AbstractFlowStep

      def self.state_transitions
        @state_transitions ||= {
            pending:   [:running, :skipped], # :skipped when its run_step is skipped
            running:   [:success, :error],
            success:   [:pending], # when restarting finalize phase
            suspended: [],
            skipped:   [],
            error:     [:pending, :skipped] # pending when restarting finalize phase
        }
      end

      def update_from_action(action)
        super
        self.progress_weight = action.finalize_progress_weight
      end

      def phase
        Action::Finalize
      end

      def mark_to_skip
        self.state = :skipped
        self.save
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
dynflow-1.8.2 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.8.1 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.8.0 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.7.0 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.11 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.10 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.8 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.7 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.6 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.5 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.4 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.3 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.2 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.6.1 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.4.9 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.4.8 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.5.0 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.4.7 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.4.6 lib/dynflow/execution_plan/steps/finalize_step.rb
dynflow-1.4.5 lib/dynflow/execution_plan/steps/finalize_step.rb