Call a Custom workflow on hit of activate button | Community
Skip to main content
August 25, 2020
Solved

Call a Custom workflow on hit of activate button

  • August 25, 2020
  • 6 replies
  • 2475 views

Hi all,

 

I have a query, on click of activate button, custom workflow should start. On page activation custom workflow should start. How can this be achieved?

 

Regards

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 SundeepKatepally

There are multiple ways

 

1) option1 : If you dont want acticate option , simply handle it via ACL by removing replicate access.

2) Option2: If you want the button to be shown, then overlay the libs/* node corresponding to libs and then write custom js to handle this. Custom js can directly call a servlet , which in-turn can initiate a model or directly invoke workflow (i am not sure whether this option will work or not.)

6 replies

Ravi_Pampana
Community Advisor
Community Advisor
August 25, 2020

Hi

 

I think you can add page activation listener and call the required logic to trigger in the listener.

 

https://helpx.adobe.com/uk/experience-manager/kb/ReplicationListener.html

Varun_Shakya
Community Advisor
Community Advisor
August 25, 2020
joerghoh
Adobe Employee
Adobe Employee
August 25, 2020
That trick should still work, but of course you need to customize the "activate workflow" for it.
akhoury
Adobe Employee
Adobe Employee
August 25, 2020

@ranjitha29 "Request for Activation" workflow model is automatically triggered if the user clicking activate doesn't have replication privileges under the path.

 

See here as well:

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-1-request-for-activation-process/qaq-p/293565/comment-id/59768

Nikhil-Kumar
Community Advisor
Community Advisor
August 25, 2020

@ranjitha29 

I assume you are able to select the custom workflow that you have created while activating the workflow. Is so simply activating a page won’t trigger your custom workflow. You need to add your custom workflow as part of activation trigger by going to properties. 


http://scottsdigitalcommunity.blogspot.ca/2013/09/creating-workflows-for-adobe-experience

 

You can also try using event listener while activation of page.

https://helpx.adobe.com/in/experience-manager/kb/ReplicationListener.html

 

 

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 25, 2020

@ranjitha29,

An additional non-hacky solution from the all of the other answers listed for this question is to edit ACL (group users); remove the "replicate" permission, which will remove the publish button from the UI. Next, give the "specific workflow" allow permission, so users can choose the workflow when they click on the +create button.

When the ACLs are configured properly, authors will be forced to run the workflow whenever they are trying to publish a page. 

 

SundeepKatepally
Community Advisor
SundeepKatepallyCommunity AdvisorAccepted solution
Community Advisor
August 26, 2020

There are multiple ways

 

1) option1 : If you dont want acticate option , simply handle it via ACL by removing replicate access.

2) Option2: If you want the button to be shown, then overlay the libs/* node corresponding to libs and then write custom js to handle this. Custom js can directly call a servlet , which in-turn can initiate a model or directly invoke workflow (i am not sure whether this option will work or not.)