Launch custom workflow on page/asset publish | Community
Skip to main content
Level 2
October 14, 2022
Solved

Launch custom workflow on page/asset publish

  • October 14, 2022
  • 2 replies
  • 2367 views

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.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SwetaB

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.

2 replies

SwetaBAccepted solution
Level 4
October 14, 2022

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.

Adobe Employee
October 14, 2022

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.


Hope this will help. Happy Coding 🙂



March 20, 2024

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?

Level 2
December 13, 2024

If you take the spaces out around the == this should work. 

jcr:content/cq:lastReplicationAction==Activate 

This argument worked for me in AEM Cloud