Hi,
We can activate a page by 2 ways. 1. using workflows 2. directly from siteadmin.
If we activate a page from siteadmin (if the assets on the page are not activated) it asks to activate those assets as well. We can select to activate the assets or not from the dialog box. Now my question is, can we do the same thing using workflow ? if we activate a page using workflow, it only activates the page. Can we activate the page and the contained assets using the same workflow ?
Solved! Go to Solution.
Views
Replies
Total Likes
Refer [1] this to write a custom workflow
[1] https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html
within execute() method, first get all the related asset for the page and activate it using the activate event (refer below code)
@Reference private Replicator replicator; private void activatePage(Session session) { //... replicator.replicate(session, ReplicationActionType.ACTIVATE, pathToPage); //... }
Views
Replies
Total Likes
yes, you can but you will have to write a custom workflow process to handle it.
Views
Replies
Total Likes
thanks for the reply..could you please provide some pointers to proceed on this..??
Views
Replies
Total Likes
Refer [1] this to write a custom workflow
[1] https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html
within execute() method, first get all the related asset for the page and activate it using the activate event (refer below code)
@Reference private Replicator replicator; private void activatePage(Session session) { //... replicator.replicate(session, ReplicationActionType.ACTIVATE, pathToPage); //... }
Views
Replies
Total Likes