Expandir minha barra de realizações na Comunidade.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.

SOLUCIONADO

Publish referenced assets in custom workflow

Avatar

Level 1

Hi,

In my current custom workflow referenced items are not getting published. I want to have a functionality similar to OOTB publish workflow where it gives a popup in publish wizard and asks if we want to activate referenced items as well. Can you please help me as to how can I implement the same behaviour for custom workflow?

1 Solução aceita

Avatar

Resposta correta de
Employee Advisor

The popup is not part of the workflow itself, but part of the "activation" logic.

Workflows run async and are not directly connected to a browser window, thus they cannot render HTML and send it as response to a user.

If you have a custom workflow, you can either replicate the activation feature (most likely to can reuse the complete logic and UI then), start the reference search first and as a final step put all that information into your custom workflow. This allows a limited amount of interactive work, but it's more complicated than a simple workflow, which just runs in the background and has no feedback channel.

Or you just implement a workflow step (as usual) and use the ReferenceSearch class [1] to find all other objects in the repo which are referencing your page.

[1] ReferenceSearch (The Adobe AEM Quickstart and Web Application.)  (note that this is not a service, but a simple object!!)

Ver solução na publicação original

3 Respostas

Avatar

Resposta correta de
Employee Advisor

The popup is not part of the workflow itself, but part of the "activation" logic.

Workflows run async and are not directly connected to a browser window, thus they cannot render HTML and send it as response to a user.

If you have a custom workflow, you can either replicate the activation feature (most likely to can reuse the complete logic and UI then), start the reference search first and as a final step put all that information into your custom workflow. This allows a limited amount of interactive work, but it's more complicated than a simple workflow, which just runs in the background and has no feedback channel.

Or you just implement a workflow step (as usual) and use the ReferenceSearch class [1] to find all other objects in the repo which are referencing your page.

[1] ReferenceSearch (The Adobe AEM Quickstart and Web Application.)  (note that this is not a service, but a simple object!!)

Avatar

Level 1

Thanks much Joerg for detailed explanation and solutions.

2nd solution would be appropriate for my custom workflow. However, for our requirement, we need to make use of com.day.cq.dam.commons.util.AssetReferenceSearch API to search the assets which are referenced in particular page we want to activate.

Avatar

Employee Advisor

That is straight forward then. Implement a custom workflow step which instantiates an AssetReferenceSearch object, execute the search method and replicate each resulting asset.

Of course you don't have a popup window then, but it's all done automatically.

Jörg