Expand my Community achievements bar.

SOLVED

AEM Workflow called on click on publish Asset

Avatar

Level 4

Hi ,

 

I am  able to initiate the workflow on click on publish of asset but my asset get published first then workflow get started.

 

I tried with these two approach to control publish event.

 

  1. Created workflow launcher
  2. Created custom event handler

 

Both are having same problem asset are publishing first then workflow get started .

 

As per requirement when author click on publish  asset, approval workflow should triggered then asset should publish.

 

Question: can we control asset publish event ?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @chetan001 ,

 

On click of publish , OOTB publish workflow gets triggered. I had the same case where I triggered my workflow on click of manage publication.

 

You can refer the below blog where I have done that. 

 

https://bimmisoi.blogspot.com/2020/07/aem-trigger-customized-workflow-on.html

 

Similarly you need to create a custom workflow, where get your work done and then publish the asset.

 

Hope this helps!

 

Thanks

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi @chetan001 ,

 

On click of publish , OOTB publish workflow gets triggered. I had the same case where I triggered my workflow on click of manage publication.

 

You can refer the below blog where I have done that. 

 

https://bimmisoi.blogspot.com/2020/07/aem-trigger-customized-workflow-on.html

 

Similarly you need to create a custom workflow, where get your work done and then publish the asset.

 

Hope this helps!

 

Thanks

Avatar

Level 4
Thanks @Bimmi_Soi for this information, I have configured same as doc but still custom workflow not getting called on publish click. do i need to refresh any bundle ?

Avatar

Employee Advisor

If you have followed this document then the workflow will be triggered on manage publication and not on publish