Sha256: 89456eb19a09e5a87d2ca8052fc7f1436c5112b1c9bf564b50b8ee164b6255ec

Contents?: true

Size: 907 Bytes

Versions: 48

Compression:

Stored size: 907 Bytes

Contents

module Hyrax
  module Actors
    # Responsible for generating the workflow for the given curation_concern.
    # Done through direct collaboration with the configured Hyrax::Actors::InitializeWorkflowActor.workflow_factory
    #
    # @see Hyrax::Actors::InitializeWorkflowActor.workflow_factory
    # @see Hyrax::Workflow::WorkflowFactory for default workflow factory
    class InitializeWorkflowActor < AbstractActor
      class_attribute :workflow_factory
      self.workflow_factory = ::Hyrax::Workflow::WorkflowFactory

      # @param [Hyrax::Actors::Environment] env
      # @return [Boolean] true if create was successful
      def create(env)
        next_actor.create(env) && create_workflow(env)
      end

      private

        # @return [TrueClass]
        def create_workflow(env)
          workflow_factory.create(env.curation_concern, env.attributes, env.user)
        end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.5 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.4 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.3 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.2 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.9.0 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.8.0 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.7.2 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.7.1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.7.0 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.6.0 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-3.0.0.pre.rc1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-3.0.0.pre.beta3 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.5.1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.5.0 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-3.0.0.pre.beta2 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.4.1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-3.0.0.pre.beta1 app/actors/hyrax/actors/initialize_workflow_actor.rb
hyrax-2.4.0 app/actors/hyrax/actors/initialize_workflow_actor.rb