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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes