Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM Workflow called on click on publish Asset

chetan001
Level 2
Level 2

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
Bimmi_Soi
Correct answer by
Community Advisor
Community 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

2 Replies
Bimmi_Soi
Correct answer by
Community Advisor
Community 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

chetan001
Level 2
Level 2
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 ?
Bimmi_Soi
Community Advisor
Community Advisor

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