There is one I can think of, relatively less hacky:
- The document workflow is controlled through the SCXML statemachine internally, and the scxml definition uses various atomic action tags such as version, copy*, …, archiveDocument actions configured with their FCQNs in the repository. [1]
- Document deletion is done through the archiveDocument action
org.onehippo.repository.documentworkflow.action.ArchiveDocumentAction
in the end, which creates an real workhorse,org.onehippo.repository.documentworkflow.task.ArchiveDocumentTask
. - So, if the action class and task class are overriden with the FQCN configuration change in the repository, you can probably add any custom logic there, and if the task throws a WorkflowException, I think it will abort the operation, too.
Regards,
Woonsan