0
votes

When publishing pages through an AEM(6.1) workflow, is it possible to add a dialog to show unpublished references in the same style as the standard publish process?

i.e. similar to https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/publishing-pages.html

1

1 Answers

0
votes

You can get the referenced assets with AssetReferenceSearch

AssetReferenceSearch assetReferenceSearch = new AssetReferenceSearch(pageContentNode, "/content/dam", resourceResolver);
Map<String, Asset> referencedAssets = assetReferenceSearch.search();
for (Map.Entry<String, Asset> entry : referencedAssets.entrySet()) {
        replicator.replicate(session, ReplicationActionType.ACTIVATE, entry.getValue().getPath());
}

Here I am replicating the Assets, but you could feed them into another workflow step for the author to approve.