Hello @kautuk_sahni ,
We are trying to create a Replication Preprocessor in AEM Publisher which should execute for Activate and Deactivate and Fire an API call if the page is deactivated with Page Path and Page Template, as this api has to be called only for few templates. We are able to execute it successfully but we are unable to get hold of resource as it is already deactivated while this preprocessor is executed. We need resource details as we need to check with if the item is Page or Asset and get template name if that is Page.
Any thoughts will be appreciated or please help me in connecting with appropriate members if in case.
Thanks
Shashi
Solved! Go to Solution.
Views
Replies
Total Likes
Are you using event handler? If yes then check https://github.com/arunpatidar02/aem63app-repo/blob/master/java/ReplicationEvent2.java
Are you using event handler? If yes then check https://github.com/arunpatidar02/aem63app-repo/blob/master/java/ReplicationEvent2.java
Views
Replies
Total Likes
Hi, you can write an event handler on node deleted. Event handler holds the state of the page in session and from there you can extract the page details. Within listener you can check the page and page template and fire API.
I am not sure about preprocessor, can you share the APIs/Examples which you are using to create preprocessor?
Views
Replies
Total Likes
Hi @arunpatidar,
the preprocessor should also work, here is an example: https://github.com/Adobe-Consulting-Services/acs-aem-samples/blob/master/core/src/main/java/com/adob...
However, I just tried it locally but the preprocess(...) method is never triggered. Has anyone successfully implemented it?
BR,
Daniel
Views
Replies
Total Likes