Hello everyone,
I have a requirement where I need to trigger a workflow upon publishing of some nodes like (page, assets, content fragments, experience fragments , tags , e.t.c) whatever resource a business user can see and publish.
I need to work only for quick publish or publish button but not for manage publication.
Is there any way that launcher detects all node types? so I can trigger workflow for that path. I have tried nt:base and anynodetype option but it is not working.
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
The project has been implemented to support the OOTB Akamai CDN, but it can be easily extended to support other CDNs by following the instructions in the section Implementing a Custom CDN Provider:
Create a class implementing the CdnInvalidationService interface. This defines the key methods to invalidate by tag, code and URL.
Add logic in your class to call your CDN's API based on the provided parameters. Refer to the Akamai service class for sample code.
Configure your service class via the OSGi config manager, providing any necessary credentials and settings.
Update the CDN Configuration ID on the EditorialAssetInvalidationJobConsumer to match your custom service.
Is there a specific reason for choosing the launcher solution? If so, you should define a launcher with the event type set to "modified." Within your custom workflow, you will need to include logic to determine whether the item of interest has been truly activated or if some other change has occurred.
Instead, I would recommend setting up an event listener for the published event (https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/replication-event-listener.... This way, you can be certain that you will only process items after they have been activated. Once you have that in place, adding your custom logic should be quite straightforward.
I used events . but I want to use launcher. Is there a way to do so?
Views
Replies
Total Likes
You can define a new WF launcher with a node type set to Modified. However, you will need to implement custom logic to determine whether the changes to the items were due to a replication action.
Thank you I understood it but as I mentioned in above. How should i trigger it for all nodes and only for quick publish.Is it possible to check if it trigerred by quickpublish button. even if I used event listener Is it possible to check the publication is trigerred by quick publish not manage publication. I am using event handles with event topic : com/day/cq/replication
Thank you.
Views
Replies
Total Likes
To my knowledge, there is no way to determine which UI button triggered the item activation from an event listener.
Views
Replies
Total Likes
Thanks. I try to know based on the property values that gets changed upon activation.
Thanks a lot for quick support.
Views
Replies
Total Likes
AFAIK the properties updated on the activation items are the same regardless of the UI feature used.
Hi @AliSyed1 , If you really want this to work any way then you can try below approach.
1.Instead of using workflow launchers, you can implement a servlet.
2. When someone clicks on quick publish or publish button then in the .js file where you call your servlet with your page paths as params and for this you need to overlay OOTB js files to hit a new servlet.
3. When someone triggers from manage publication you need not to call any servlet. There should be a diff .js file for this manage publication and even if it is a same js file you can put some if conditions to not trigger servlet.
Thanks,
Ramesh.
Thanks,
Ramesh.
Hi @Uppari_Ramesh , Thanks for reply. The approach you suggested is good. but I can see that there are many js files and servlets. That is we have separate js file for pages , xf , assets , tags and so on. I think using event listener is some what nice approach. please correct me if needed.
Views
Replies
Total Likes
If i used event listener . what is best approach to make the cdn purging configurable. so authors can easily enable/disable or provide restricted paths? I thought of using a dedicated page. I don't think it is a good idea. Please note we have multiple subsidaries with dedicated author and approvers.
Thanks for your support.
Views
Replies
Total Likes
You may want to have a look at my repository: https://github.com/realgpp/aem-cdn-cache-invalidator.
This AEM library automates invalidating cached content in content delivery networks (CDN) when publishing updates in AEM.
Hi @giuseppebag is aemaacs ootb cdn akamai or fastly? Please clear my doubt. my project lead told that it is fastly.
Views
Replies
Total Likes
The project has been implemented to support the OOTB Akamai CDN, but it can be easily extended to support other CDNs by following the instructions in the section Implementing a Custom CDN Provider:
Create a class implementing the CdnInvalidationService interface. This defines the key methods to invalidate by tag, code and URL.
Add logic in your class to call your CDN's API based on the provided parameters. Refer to the Akamai service class for sample code.
Configure your service class via the OSGi config manager, providing any necessary credentials and settings.
Update the CDN Configuration ID on the EditorialAssetInvalidationJobConsumer to match your custom service.
Thanks
Views
Likes
Replies
Views
Likes
Replies