Hi, i want to trigger a workflow, which creates a new version of an asset when the user publishes the asset. to achieve this i created a model which has the following steps 1) flow start, 2) Activate Page/Asset, 3) create version 4) Flow end. and then i created a launcher to launch. it is working fine, but when the user modifies any metadata (we have custom or dam or dc) the launcher is triggered. we already have DAM Meta Data write back workflow that is triggered when the metadata is modified and this also creates a new version. so now when the user is modifying any metadata, both the workflows are triggered and 2 versions are created.
any ideas as to how to restrict my workflow launcher to publish only??
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
I found out the solution. adding this "jcr:content/cq:lastReplicationAction==ACTIVATE" to the conditions in the workflow launcher fixed the issue.
just wanted to add, this is a on-prem AEM instance
조회 수
답글
좋아요 수
@ASP_Corp invoke this workflow/ service from within an event listener that listens to replication events. when an asset is published, it will create a replication event that you can then listen to and invoke your workflow/logic to create asset versions.
Refer to the below on how to create an event listener
https://aemhints.com/2020/11/08/event-listener-in-aem-6-5/
@Harwinder-singh , thank you for the reply, but isnt there a simple way to restrict my workflow launcher via conditions, exclusion..etc??. like trigger my workflow via launcher when the quick publish or manage publish is clicked?, writing a class for a rather simple scenario is a bit overkill i think.
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
Hi @Aditya_Chabuku , this is just a general configuration for workflow launcher, iam looking at specific configuration so that my workflow gets triggered only when the asset is published. thank you.
@Harwinder-singh , agreed. and this is one of the reasons our clients are cautions to migrate to AEM cloud.
조회 수
답글
좋아요 수
I found out the solution. adding this "jcr:content/cq:lastReplicationAction==ACTIVATE" to the conditions in the workflow launcher fixed the issue.