Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Launch custom workflow on page/asset publish

Avatar

Level 2

Hi,

 

I am using AEM 6.5 version.

 

I have created a custom workflow model.

Currently I am able to launch it manually for single page.

 

But my requirement is to launch a workflow automatically as soon as activate button is clicked on page or asset from author.

I don't want to trigger workflow separately.

Is there any default workflow which AEM provides.

Or please suggest a process for automating workflow triggering.

I don't want to do it from workflow launcher on replication date modified node change.

 

Thanks in advance.

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Kiranchonkar ,

 

You can create an event handler which listens to the replication event and triggers your workflow programmatically.

 

Follow the below blog

https://redquark.org/aem/day-15-eventing-in-aem/

 

Hope this helps.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 4

Hi @Kiranchonkar ,

 

You can create an event handler which listens to the replication event and triggers your workflow programmatically.

 

Follow the below blog

https://redquark.org/aem/day-15-eventing-in-aem/

 

Hope this helps.

Avatar

Level 3

Hi @Kiranchonkar ,

Use workflow launcher based on node modify with condition "jcr:content/cq:lastReplicationAction == Activate" . (not with replication date)

Please find the below screenshot.

malay_dube_0-1665732677096.png


Hope this will help. Happy Coding



Avatar

Level 1

when i add this condition "jcr:content/cq:lastReplicationAction == Activate" the laucher doesnt get triggered anymore... but does when i remove the condition any ideas?