Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Page Activation Workflow

Avatar

Level 4

Hi

I am trying to create a page activation workflow.

Currently i am facing the issue with the assets belongs to the current page is not get activated.(ie) Only the page got activated.

My Idea is get all the reference which belongs to current page and activate them.

is it a correct way to do?

if so how to get the reference?

else kindly route me in correct direction.

Bunch of thanks in advance,

Michael Vino

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Michael,

see this example [1]. Basically you should use the AssetReferenceSearch service, which does the work for you.

Jörg

 

[1] http://wemcode.wemblog.com/get_asset_reference_in_page

View solution in original post

9 Replies

Avatar

Level 5

Hi,

In CQ, you can't publish both page and related DAM asset together. Only way to publish page and asset in DAM is doing that separately. DAM and Page are decoupled in CQ. So whenever you will publish the page, only your page will get published not DAM assets.

Regards

Avatar

Level 8

There is an example installed called Scheduled Page/Asset Activation:

http://localhost:4502/cf#/etc/workflow/models/scheduled_activation.html

The "activate" step uses an existing OSGi service called Activate Page, which is installed with CQ. Are you using this service?

scott

Avatar

Correct answer by
Employee Advisor

Michael,

see this example [1]. Basically you should use the AssetReferenceSearch service, which does the work for you.

Jörg

 

[1] http://wemcode.wemblog.com/get_asset_reference_in_page

Avatar

Level 2

I also have the same use case. I am also using the Page Activate service but it only activates the page, it doesn't activate the DAM assets associated with the page. 

I have checked Scheduled Page/Asset Activation workflow, it also uses the same service and doesn't activate the page assets, only activates the page

Michael, did you get any solution for this ??

Avatar

Level 4

HI Jorg,

Thanks a lot. its working fine.

Regards,

MIke

Avatar

Level 4

Hi KapilDev.

We have a JSON service which provides the list of asset available on the page as JSON data.

Then you have to create workflow  in that u have to make a HTTP Client call to the below service and read the path in JSON result  and activate both the assets and page using replication  API.

http://localhost:4502/libs/wcm/core/content/reference.json?path=pagepath

Regards,

Mike

Avatar

Level 8

michaelvino86 wrote...

Hi KapilDev.

We have a JSON service which provides the list of asset available on the page as JSON data.

Then you have to create workflow  in that u have to make a HTTP Client call to the below service and read the path in JSON result  and activate both the assets and page using replication  API.

http://localhost:4502/libs/wcm/core/content/reference.json?path=pagepath

Regards,

Mike

 

 

Similarly, page information providers might be interesting to you: https://dev.day.com/docs/en/cq/current/developing/pageinfo.html 

scott

Avatar

Level 4

Scott Brodersen wrote...

michaelvino86 wrote...

Hi KapilDev.

We have a JSON service which provides the list of asset available on the page as JSON data.

Then you have to create workflow  in that u have to make a HTTP Client call to the below service and read the path in JSON result  and activate both the assets and page using replication  API.

http://localhost:4502/libs/wcm/core/content/reference.json?path=pagepath

Regards,

Mike

 

 

Similarly, page information providers might be interesting to you: https://dev.day.com/docs/en/cq/current/developing/pageinfo.html 

scott

 

Wav... Its provide all the information about the page.

Bunch of thanks.

Mike