Hi ,
My requirement is to replicate a page/asset from a workflow using a different replication agent.
I am using replicator.replicate(session,ReplicationActionType.ACTIVATE, path, opts);
I wanted to know if the replication is success or not in the code itself(either by reponse status=200 or some Boolean value) , as I wanted to follow some steps if the replication is success(Activate).
Is there any way to know ,please reply?
Thanks,
Pallavi
Solved! Go to Solution.
com.day.cq.replication.Replicator has a method 'getReplicationStatus' whic returns the object of 'ReplicationStatus' and it has methods like 'isActivated', 'isDeactivated' 'isDelivered' etc to check if content is replicated or not.
com.day.cq.replication.Replicator has a method 'getReplicationStatus' whic returns the object of 'ReplicationStatus' and it has methods like 'isActivated', 'isDeactivated' 'isDelivered' etc to check if content is replicated or not.
Hi Pallavi,
You can adopt payload resource to replicationStatus. http://dev.day.com/docs/en/cq/5-5/javadoc/com/day/cq/replication/ReplicationStatus.html
Ex:- ReplicationStatus rs = res.adaptTo(ReplicationStatus.class);
Thanks,
Thanks for the response..it worked.
Views
Replies
Total Likes
Views
Likes
Replies