DAM asset activation when a page is activated using a workflow | Community
Skip to main content
October 16, 2015
Solved

DAM asset activation when a page is activated using a workflow

  • October 16, 2015
  • 3 replies
  • 1443 views

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

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

3 replies

Lokesh_Shivalingaiah
Level 10
October 16, 2015

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

October 16, 2015

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

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 16, 2015

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