Open bess opened 7 years ago
For our Hyrax-based application ( https://github.com/duke-libraries/rdr ), we wanted a difference in one part of the default
workflow behavior. I guess what we did counts as a custom workflow, though probably just barely -- https://github.com/duke-libraries/rdr/blob/v1.3.0/config/workflows/curated_workflow.json .
config/workflows/default_workflow.json
to config/workflows/curated_workflow.json
. In the copied file, we changed the name
, label
, and description
in the (first) workflows
hash.Workflow::GrantAccessToDepositor
class based loosely on the Hyrax::Workflow::GrantEditToDepositor
class used in the default
workflow. Cf. https://github.com/duke-libraries/rdr/blob/v1.3.0/app/services/workflow/grant_access_to_depositor.rb .config/workflows/curated_workflow.json
file, we substituted our Workflow::GrantAccessToDepositor
for Hyrax::Workflow::GrantEditToDepositor
.bin/rails hyrax:workflow:load
to load the new workflow into the application's database.Workflow
tab of our admin set so we could select it as the workflow for that admin set.config.default_active_workflow_name
to the name of the new workflow in the Hyrax
initializer: https://github.com/duke-libraries/rdr/blob/v1.3.0/config/initializers/hyrax.rb#L16 .Happy to answer any questions I can about what we did.
We had to create a custom workflow for the Hyrax project we are currently working on. We wanted to extend the one step mediated deposit workflow and add an action to reject. The steps we took are largely similar to what @coblej described above
Copy config/workflows/mediated_deposit_workflow.json
to config/workflows/publishing_workflow.json
. In the copied file, we changed the name
, label
, and description
in the (first) workflows
hash.
Create a notification for RejectedNotification in app/services/hyrax/workflow/rejected_notification.rb
Add the subject and message to the locale file config/locales/en.yml as shown in this gist
Load the new workflow by running bin/rails hyrax:workflow:load
to load the new workflow into the application's database.
The new workflow should be visible in the drop down list on the Workflow
tab when creating a new collection of type Admin Set (or editing an existing admin set collection)
Group-Sourced Content: Workflows & Mediated Deposit
Issue goal:
To complete documentation re: Workflows by answering these questions in the Q&A workflow section.
Current Questions
Feedback Needed
Do you have additional questions regarding workflows & mediated deposit?
Do you have experience in any area regarding workflows?