Performing action on document unpublish
Hello all. I need to implement the following functionality and could use some suggestions.
When a document gets unpublished (either manually or through scheduled expiration) the document either needs to be deleted or moved to another folder depending on some checkbox properties of that document.
So far I have managed to implement this functionality by implementing a custom workflow for the AnyMediaContentApprovalWorkflow.xamlx. However my CodeActivity only seems to fire when the user manually publishes or unpublishes a document using the buttons, but not when the document is unpublished automatically due to the expiration date.
Any suggestions on how to hook into the scheduling of the automatic unpublish of the document in order to implement this logic?
Thanks
Any suggestions?