Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Replication Preprocessor not working in Publisher

Avatar

Community Advisor

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
3 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor
No Arun, but if we use Event Handler, what is the use of Replication Pre-Processor?

Avatar

Community Advisor

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.

https://github.com/arunpatidar02/aem63app-repo/blob/2d0f8e75343f651b1055f81cec5348a0c87f1b71/java/Ti...

 

I am not sure about preprocessor, can you share the APIs/Examples which you are using to create preprocessor?