Expand my Community achievements bar.

SOLVED

DAM asset activation when a page is activated using a workflow

Avatar

Former Community Member

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 ?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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); //... }

View solution in original post

3 Replies

Avatar

Level 10

yes, you can but you will have to write a custom workflow process to handle it.

Avatar

Former Community Member

thanks for the reply..could you please provide some pointers to proceed on this..??

Avatar

Correct answer by
Level 10

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); //... }