Approval Workflow - Page and modified Assets publish together

Avatar

Avatar

RonakB

Avatar

RonakB

RonakB

23-06-2019

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

Replies

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Reply

838

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Reply

838
Arun_Patidar
MVP

24-06-2019

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

Avatar

Avatar

RonakB

Avatar

RonakB

RonakB

24-06-2019

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

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Reply

838

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Reply

838
Arun_Patidar
MVP

25-06-2019

I am not sure if there is any API available.