Skip to content

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)

  1. 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)
  2. 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
  3. 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')
  4. Let the user know it's time to try again