In the custom workflow where you have list of additional pages that needs to be removed use the replication api to deactivate it.
replicator.replicate(session, ReplicationActionType.DEACTIVATE, path);
Thanks for quick reply.
My requirement is not deactivating pages. I need to remove cache for the pages which are going to publish using custom workflow.
Currently all the pages are caching using dispatcher to load pages quicky because it contains heavy content, whenever author modify the specific page content or asset and publish it using my custom workflow then the first step I need to remove the cache and later replicate it. So that next time page should load from repository with new content.
Is there any way to fulfill above requirement? i.e., remove specific page cache before replicating it.
Thanks in advance.
If the document (Page/Asset) is configured for auto-invalidation, the Dispatcher checks whether it is older or newer than the last change available. If it is older, the Dispatcher requests the current version from the CQ instance and replaces the version in the cache. With said so if you just activate the page/asset the next time page/asset is requested it should render the new content. So no need to delete and activate it. Are you not seeing this behaviour ? If so make sure to follow .
In case you want to delete the cache and after some time like to activate. Try with setting replication filter for flush agent only and then have the replicationactiontype set to delete.
It is useful but still it would be great if you provide me the workflow process step (.java file) instead of ecma script file.
I do not have anything handy to share but it is very easy to build and explained well with many examples at http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/developing_workflows.html
Please let me know if you encountering any issue with building one.
You can write workflow process to do specific page invalidation. You can pass page path in workflow argument or read from somewhere else. See if code below helps (You need to change code to workflow process from document suggested by Sham)