-
Notifications
You must be signed in to change notification settings - Fork 2
Fix a draft item stuck in accessioning
Peter Mangiafico edited this page Nov 21, 2024
·
1 revision
If an H2 item has been submitted for accessioning and gets stuck because reasons (e.g., a password-protected PDF), here is the process we've used to roll that item (using jm401gg7955
as the druid in this example) back. NOTE: these instructions assume the item was not previously accessioned.
OR you can use the new DSA Rake task for cleanup as described here: https://github.com/sul-dlss/dor-services-app/wiki/Stop-Accessioning-in-Progress and then come back to H2 just to reset the status (step 3 below)
- Delete the accessionWF for the item
- Hop into the Rails console in an app that uses the
dor-workflow-client
gem WorkflowClientFactory.build.delete_workflow(druid: 'druid:jm401gg7955', workflow: 'accessionWF', version: 1)
- Hop into the Rails console in an app that uses the
- Remove all of the files for that item from the DOR workspace
- From a box that mounts the workspace:
rm -rf /dor/workspace/jm/401/gg/7955/jm401gg7955
- From a box that mounts the workspace:
- Set the item's state in H2 back to draft
- From the H2 console:
Work.find_by(druid: 'druid:jm401gg7955').head.update(state: 'first_draft')
- From the H2 console:
- Let the user know it's time to try again