Hi @sreenu539 , I think an Adobe support ticket will get help with this as an enhancement but for now maybe you can create an Event Listener to listen for changes to the content fragment resources and trigger the synchronization process. Something like below to check if this works as expected.
@Component(service = EventHandler.class,
immediate = true,
property = {
EventConstants.EVENT_TOPIC + "=" + PageEvent.EVENT_TOPIC,
EventConstants.EVENT_FILTER + "=(path=/content/dam/*)"
})
public class ContentFragmentEventListener implements EventHandler {
@Reference
private ResourceResolverFactory resolverFactory;
@Override
public void handleEvent(Event event) {
PageEvent pageEvent = (PageEvent) event;
for (ResourceChange change : pageEvent.getChanges()) {
try (ResourceResolver resolver = resolverFactory.getServiceResourceResolver(null)) {
Resource resource = resolver.getResource(change.getPath());
if (resource != null && isContentFragment(resource)) {
CustomContentFragmentModel model = resource.adaptTo(CustomContentFragmentModel.class);
model.synchronizeVariations(resource.getChild("jcr:content"));
}
} catch (LoginException e) {
// Handle exception
}
}
}
private boolean isContentFragment(Resource resource) {
return resource.getResourceType().equals("dam:Asset");
}
}