Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Bulk replication assets and folders- activate/deactivate


Level 9



Tried checking replicator.replicate option for activate, but it only activates the node and not sub nodes, and node can be a sling folder or dam:asset. 

The same with deactivate. Is this the expected behavior via api?


I would also like to avoid replication of a subfolder A, if there are children in that sub folder , that have not been replicated . Same with deactivation. What is the best approach other than traversal or query builder query? can/should sling query be used?

1 Accepted Solution


Correct answer by
Community Advisor
4 Replies


Level 9

I think i might have the answer, let me know your thoughts, not sure of any limitation wrt api


replicator.getActivatedPaths(session, path);- get the string path array and then deactivate. 


String[] pathArray = pathList.toArray(new String[0]);
replicator.replicate(session, ReplicationActionType.DEACTIVATE, path);




Community Advisor

Hi @NitroHazeDev ,

Activating the given path does not activate child node within that path. But It invalidates every page within that path in Dispatcher. 

Tree Activation may helps in your case, please check here:




Level 9

@SantoshSai Do you know of unpublish, based on my observations it is the same as replication where it is targeted to the specific path to activate or deactivate via api vs all it’s children.  The problem is since not all resources may or may not be published , I can’t replicate the tree . By tree replication, first glance , it is iteration and activating one resource at a time ? 
It invalidates but does not unpublish IMO ? 


Correct answer by
Community Advisor

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now