I am facing one issue while publishing and unpublishing of assets into Brand Portal (AEM 6.5.11). When I publish assets to Brand Portal, it sets a property dam:portalReplicationAction to Activate as well sets cq:lastReplicationAction to Activate. Similarly, when I click Unpublish from Brand Portal in AEM, it sets dam:portalReplicationAction to Deactivate as well sets cq:lastReplicationAction to Deactivate. This is same behaviour on the vanilla instance as well.
Due to change of cq:lastReplicationAction, it causes an issue for us as it calls our custom Event Handler.
Is there an OOTB way that can stop this property cq:lastReplicationAction from being affected? Or do we need to write some custom solution for this?
Anyway, I am going to raise an Adobe ticket for this but if someone has faced this issue before, could you please share your experience?
@Abhishek_Narula25 This is expected behavior, if you have a custom handler that is getting triggered because of this update then you might have to handle it on a custom handler.
If the property, cq:lastReplicationAction is changed to "Deactivate" on Unpublish from Brand portal, then that respective asset should also be deactivated from the publish instance which is not happening. So, ideally it should not change this property.
I just responded on your different thread (created on "AEM Assets" section)
We might to investigate and do some analysis to check, is this an expected behaviour with AEM Brand Portal replication process?
@Mayank_Gandhi I am not manually changing the property. What I mean is, when we click on "Unpublish from Brand Portal", it automatically changes cq:lastReplicationAction property to "Deactivate". This should deactivate the asset from the publisher but it's not. So, ideally it should not change this property.