Created
March 1, 2019 11:59
-
-
Save anusharanganathan/1cab314607f1fe53611796afe289ce9a to your computer and use it in GitHub Desktop.
Mediated deposit workflow for publishing works
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workflows": [ | |
{ | |
"name": "publishing_workflow", | |
"label": "Mediated deposit workflow for publishing works", | |
"description": "A single-step workflow for mediated deposit in which all deposits must be approved by a reviewer. Reviewer may send deposits back to the depositor or reject a work from being published.", | |
"allows_access_grant": false, | |
"actions": [ | |
{ | |
"name": "deposit", | |
"from_states": [], | |
"transition_to": "pending_review", | |
"notifications": [ | |
{ | |
"notification_type": "email", | |
"name": "Hyrax::Workflow::PendingReviewNotification", | |
"to": ["approving"] | |
} | |
], | |
"methods": [ | |
"Hyrax::Workflow::DeactivateObject" | |
] | |
}, { | |
"name": "request_changes", | |
"from_states": [{"names": ["deposited", "pending_review"], "roles": ["approving"]}], | |
"transition_to": "changes_required", | |
"notifications": [ | |
{ | |
"notification_type": "email", | |
"name": "Hyrax::Workflow::ChangesRequiredNotification", | |
"to": ["approving"] | |
} | |
], | |
"methods": [ | |
"Hyrax::Workflow::DeactivateObject", | |
"Hyrax::Workflow::GrantEditToDepositor" | |
] | |
}, { | |
"name": "approve", | |
"from_states": [{"names": ["pending_review"], "roles": ["approving"]}], | |
"transition_to": "deposited", | |
"notifications": [ | |
{ | |
"notification_type": "email", | |
"name": "Hyrax::Workflow::DepositedNotification", | |
"to": ["approving"] | |
} | |
], | |
"methods": [ | |
"Hyrax::Workflow::GrantReadToDepositor", | |
"Hyrax::Workflow::RevokeEditFromDepositor", | |
"Hyrax::Workflow::ActivateObject" | |
] | |
}, { | |
"name": "reject", | |
"from_states": [{"names": ["pending_review"], "roles": ["approving"]}], | |
"transition_to": "rejected", | |
"notifications": [ | |
{ | |
"notification_type": "email", | |
"name": "Hyrax::Workflow::RejectedNotification", | |
"to": ["approving"] | |
} | |
], | |
"methods": [ | |
"Hyrax::Workflow::GrantReadToDepositor", | |
"Hyrax::Workflow::RevokeEditFromDepositor", | |
"Hyrax::Workflow::ActivateObject" | |
] | |
}, { | |
"name": "request_review", | |
"from_states": [{"names": ["changes_required"], "roles": ["depositing"]}], | |
"transition_to": "pending_review", | |
"notifications": [ | |
{ | |
"notification_type": "email", | |
"name": "Hyrax::Workflow::PendingReviewNotification", | |
"to": ["approving"] | |
} | |
] | |
}, { | |
"name": "comment_only", | |
"from_states": [ | |
{ "names": ["pending_review", "deposited", "rejected"], "roles": ["approving"] }, | |
{ "names": ["changes_required"], "roles": ["depositing"] } | |
] | |
} | |
] | |
} | |
] | |
} |
Translations
# config/locales/en.yml
en:
ngdr:
notifications:
workflow:
deposited:
message: "%{title} (%{link}) was rejected by %{user}. %{comment}"
subject: Deposit has been rejected for publishing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rejected notification