cq5 - Adobe AEM WorkFlow activate a page including child pages -


this question has answer here:

i want activate page include it's child pages using workflow below

parent node

・child node 1 ・child node 2 ・child node 3 

requirement is: possible ??? please give solution in comment...... thank much!!!

you can use replicator api activate pages.

in workflow process step. can following

currentpage = getcurrentpagepath(); // have figure out, depends on workflow code i.e how workflow got triggered.

now,

iterator<page> childpages = currentpage.listchildren(); 

now iterate on child pages , each child page, following

replicator.replicate(session,repplicationactiontype, childpagepath); 

you can instance of replicator using osgi dependency injection.

@reference public replicator replicator 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -