I completely understand what you're trying to achieve, but I'm a little reluctant to make this part of the SuperNTF core feature set for fear of introducing too much complexity for our primary target audience. That said, I'm not ruling it out, as there may be an elegant way to allow "custom extensions" (either an agent or a script library routine) to be added and then tell the form config document what additional code to run for that form whenever querydocumentdelete is triggered.
It would work something like this:
- deletion action triggers querydocumentdelete
- querydocumentdelete detects the form name of each deleted document and checks the form config to see if any additional action is required
- if so, it runs the code specified in the form config document.
There are several issues to consider around this, including:
- Whether soft deletions can remain on or should be disabled
- Whether to use ACL settings to restrict "real" deletion rights but still give some folks a "[DeleteDocs]" role that would trigger this workflow method of deletion
- Add a [DeletionApprover] role
- How to handle programmatic deletions
This is a very nice feature to be sure, and its probably worth at least creating an example of it on top of SuperNTF for people to see. Indeed, one of the purposes for which I envisioned SuperNTF being used was precisely as a way to distribute example code inside a full-blown application (instead of just a script library stuffed in an otherwise blank db).
I'll have to think on the idea of putting in the base code though.