Hi Keith,
I hate to say this, but I'd recommend *AGAINST* deleting anything in the database directly. The workflowitem table also does use/link to the item table and metadatavalue table, and resourcepolicy table, and they already are linked to whatever collection they
are being submitted into (via the item table), etc etc. In other words, it's really hard to craft a query that would clean everything up safely. More than likely something would get forgotten and you could hit really odd errors later on (as DSpace doesn't
always handle orphaned data perfectly...it expects you not to touch the database directly)
A few options exist:
- You could see if it's possible to "rollback" (or restore) and older backup of your database from prior to the 1,000 workflow items. However, if other new content was added since then, it would also be lost (unless you could simply resubmit those items)
- You could go in and reject these items (one by one, or if you can install the JSPUI, there's an "Administer -> Content -> Workflow" page which lets you reject as an Admin). This would send them back to the submitter's "workspace". The submitter can then
login & bulk delete them (using a checkbox).
- You could craft a SQL query to move all those (in progress) items into a new, temporary Collection and then delete that entire temporary Collection (which should delete all associated items).
- (There may be other workarounds here that others on this list have done to fix this issue)
I'd highly recommend trying these on a subset of data in your test environment *first* to verify it works overall. This is especially true if you decide to go the database modification route.
I know this is frustratingly not easy to bulk delete in progress submissions in DSpace right now. This will become quite a bit easier in DSpace 7 (once released later this year), as it comes with a full featured REST API which allows for easier scripting of
bulk changes (without needing touch the database).
If others on this list have figured out a better way to clean up workspace or workflow items in bulk, hopefully they will share their hints/tips.
Tim