Expand my Community achievements bar.

Approval Workflow - Page and modified Assets publish together

Avatar

Level 3

I have got a custom workflow to activate the page post approval. But it has issue where it only publishes page and not associated assets. I get to know about   AssetReferenceSearch class to activate the assets. However, I am trying to fine tune it a bit to publish the assets only if they are not published or modified after last publish action. How do I achieve it programmatically . I am on AEM 6.3

3 Replies

Avatar

Community Advisor

You can check the get the assets from payload page using java API and check the replication status and modified and last replicated date

e.g.

aem63app-repo/GetPageAsset.java at master · arunpatidar02/aem63app-repo · GitHub



Arun Patidar

Avatar

Level 3

Thanks Arun. But what I was looking for was kind of API method which tell me that this asset needs re-publishing because it was modified after last publish. Doing manually was the last option.

Avatar

Community Advisor

I am not sure if there is any API available.



Arun Patidar