SlingPostProcessor is not invoked after dialog submission in AEM
I am doing some post-processor work after dialog submission so I am creating a SlingPostProcessor to update the node desired property. SlingPostProcessor is working for component A but the same is not working for component B
Here is my working component A code. Below process method is invoked as soon I submit the component dialog A
@8220494(
service = SlingPostProcessor.class,
immediate = true,
property = {
"service.ranking:Integer=-1"
},
configurationPolicy = ConfigurationPolicy.REQUIRE
)
public class ComponentAPostProcessor implements SlingPostProcessor {
@9944223
public void process(SlingHttpServletRequest request, List<Modification> modifications) throws Exception {
if ("/component/.....componentA".equals(request.getResource().getResourceType());) {
.....
}
}
Here is my not working code(component B). This below process is not invoked after dialog submission. I tried to change the service.ranking:Integer value to 0 and -2 but it is not working.
@8220494(
service = SlingPostProcessor.class,
immediate = true,
property = {
"service.ranking:Integer=-1"
},
configurationPolicy = ConfigurationPolicy.REQUIRE
)
public class ComponentBPostProcessor implements SlingPostProcessor {
@9944223
public void process(SlingHttpServletRequest request, List<Modification> modifications) throws Exception {
if ("/component/.....componentB".equals(request.getResource().getResourceType());) {
.....
}
}
}
No error on log. I think service.ranking:Integer=-1 tells which is lower priority but it is not working when I keep the value in two SlingPostProcessor classes. any reason ?