app/jobs/graduation_job.rb
# Transition the workflow of this object to the "published" workflow state
# This should also mark it as active.
Transition the workflow of this object to the "published" workflow state
This should also mark it as active.
Transition the workflow of this object to the " published " workflow state This should also mark it as active .
def publish_object
    approving_user = ::User.find_by_uid(WorkflowSetup::ADMIN_SET_OWNER)
    subject = Hyrax::WorkflowActionInfo.new(@work, approving_user)
    sipity_workflow_action = PowerConverter.convert_to_sipity_action("publish", scope: subject.entity.workflow) { nil }
    Hyrax::Workflow::WorkflowActionService.run(subject: subject, action: sipity_workflow_action, comment: "Published by graduation job #{Time.zone.today}")
    Rails.logger.warn "ETD #{@work.id} published via WorkflowActionService"
  end
def publish_object approving_user = :: User . find_by_uid ( WorkflowSetup :: ADMIN_SET_OWNER ) subject = Hyrax :: WorkflowActionInfo . new ( @work , approving_user ) sipity_workflow_action = PowerConverter . convert_to_sipity_action ( "publish" , scope : subject . entity . workflow ) { nil } Hyrax :: Workflow :: WorkflowActionService . run ( subject : subject , action : sipity_workflow_action , comment : "Published by graduation job #{Time.zone.today}" ) Rails . logger . warn "ETD #{@work.id} published via WorkflowActionService" end
Transition the workflow of this object to the "published" workflow state
This should also mark it as active.
Transition the workflow of this object to the " published " workflow state This should also mark it as active .