I'm trying to create a workflow trigger to automatically delete from the publish node files that are deleted on the author node. This seems to be a rather serious problem that is not well addressed in any case.
Regardless, I tried the obvious approach: create a workflow that just calls 'Deactivate Page/Asset' and set up a workflow launcher to start that workflow on removal of the nodes of interest. And I get a seemingly obvious problem: the workflow can't work, because the workitem isn't around. I get an error message like this in the error log:
*WARN* [JobHandler: /etc/workflow/instances/2014-07-31/model_8459707671124452:/etc/designs/common/top/sample.js] com.day.cq.wcm.workflow.process.ReplicatePageProcess Cannot activate page or asset because path is null for this workitem: com.day.cq.workflow.impl.exec.CQWorkItemWrapper@14aaef2d
Is there any way to deactivate a deleted item, particularly automatically?