Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Nível 1
Nível 2
Faça login na Comunidade
Faça logon para exibir todas as medalhas
Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.
Team - In the past, we used Replicator (com.day.cq.replication.Replicator) to activate pages programmatically. Currently, I'm trying to publish assets and pages in a custom workflow in AEMaacS.
AEMaaCS does not use the replication agents used in previous versions of AEM. As I understand it, content in AEM Cloud Service is replicated using Sling Content Distribution to a pipeline service that is not part of AEM.
Could you please tell me what APIs should be used to call appropriate distributions to publish a specific asset?
Solucionado! Ir para a Solução.
In AEM Cloud as well you can use Replicator API to activate resources. In cloud you don't need to provide any replication agent via ReplicationOptions. Replicator API picks the only active agent in AEM cloud which is "publish" agent.
So below code should work as its working for me in my workflow process.
@Reference private Replicator replicator; replicator.replicate(session, ReplicationActionType.ACTIVATE, assetPath);
In AEM Cloud as well you can use Replicator API to activate resources. In cloud you don't need to provide any replication agent via ReplicationOptions. Replicator API picks the only active agent in AEM cloud which is "publish" agent.
So below code should work as its working for me in my workflow process.
@Reference private Replicator replicator; replicator.replicate(session, ReplicationActionType.ACTIVATE, assetPath);
Thanks but I want to call specific distribution service. I have 3 distributions or agents, those are preview, publish and Publish to brand portal. In this case i want to publish only Publish to brand portal agent. Is it possible ?
Visualizações
respostas
Total de curtidas
Yes, you can call specific distribution service like this.
@Reference
private Replicator replicator; ReplicationOptions options = new ReplicationOptions(); options.setFilter(new AgentFilter() { @Override public boolean isIncluded (Agent agent) { return agent.getId().equals(DISTRIBITION_SERVICE_NAME); //PUBLISH or PREVIEW or any other distribution service you have } }); replicator.replicate(session,ReplicationActionType.ACTIVATE, assetPath, options);
Thank you for your response.
Visualizações
respostas
Total de curtidas
Visualizações
Curtida
respostas
Visualizações
Curtida
respostas