I have a scenario where i trigger job in AEM Publish instance using ReplicationAction in on-prem, so now in AEMaaCS how to get replication object??
final ReplicationAction replicationAction = ReplicationEvent.fromEvent(event).getReplicationAction();
final ReplicationActionType actionType = replicationAction.getType();
final String FilePath = replicationAction.getPath();
i'm using the filePath to trigger job for removing the file/asset here.
could anyone guide me here that how to get path or file name while unpublishing/remove or publishing??
Views
Replies
Total Likes
Hi @KarthickVe ,
You can publish/unpublish content using the Replication API in AEMaaCS - API Documentation
Reference Link - https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/operations/repli...
So the same way should actually work as under the hood, AEMaaCS maps the replication actions (such as activate, deactivate) to corresponding Sling Content Distribution mechanisms.
Did you encounter any error when running the same program on AEMaaCS?
Hello@Rohan_Garg ,
you mean below code is valid is AEMaaCS as well??
final ReplicationAction replicationAction = ReplicationEvent.fromEvent(event).getReplicationAction();
final ReplicationActionType actionType = replicationAction.getType();
final String FilePath = replicationAction.getPath();
i thought its deprecated now or later as we have sling content distribution in place for AEMaaCS.
is it okay to use same code in cloud as well??
Yes, by maintaining the Replication API as a facade, AEMaaCS allows a smooth transition in moving from traditional AEM deployments to the cloud service, ensuring that custom replication logic and integrations continue to function correctly.
@Rohan_Garg , Thanks for clarifying this topic.
i'm trying to trigger this listener on the event of replication but its not triggering.
@KarthickVe You can use ReplicationAction.fromEvent(event).getPath() to get the resource path.
Hello @Harwinder-singh, is it okay to use ReplicationAction.fromEvent(event).getPath() api code in cloud as well??
since AEMaaCs uses sling content distribution api so i'm having doubt here.
@KarthickVe Yes please.
i'm trying to trigger this listener on the event of replication in publish environment but its not triggering.
@KarthickVe Can you please use com/day/cq/replication as event topic?
@Harwinder-singh This com/day/cq/replication event will be used in author not works in publish. all the event handler not working in cloud. only event listener is working in cloud.
Hello @Harwinder-singh ,
i'm trying to trigger this listener on the event of replication but its not triggering.
@KarthickVe Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies