Triggering workflow upon page deactivation | Community
Skip to main content
Level 3
October 16, 2015
Solved

Triggering workflow upon page deactivation

  • October 16, 2015
  • 8 replies
  • 4168 views

Dear All,

I have a requirement where I need to trigger a custom workflow upon page deactivation. Author is expected only to deactivate page and I should internally trigger my workflow. Can someone please suggest with some sample code. 

I tried with EventHandler but FramworkUtil is not having a method - getBundle to get the bundle context. I am using osgi coe version 4.3.0 

Please provide some code example whcih I can use or refer.

Thanks,

Ravi

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 joerghoh

Hi,

if your author does not have the "replicate" privilege, the logic behind the "deactivate" buttons invokes the "request for deactivation" workflow by default (at least in Classic UI, haven't tested with TouchUI yet). And then you can customize this workflow.

kind regards,
Jörg

8 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi,

if your author does not have the "replicate" privilege, the logic behind the "deactivate" buttons invokes the "request for deactivation" workflow by default (at least in Classic UI, haven't tested with TouchUI yet). And then you can customize this workflow.

kind regards,
Jörg

edubey
Level 10
October 16, 2015

Hi,

For deactivation are you using your custom workflow ?

Lokesh_Shivalingaiah
Level 10
October 16, 2015

you can customize the deactivate action and assign that service when you click on 'deactivate' button

Ravi_KSAuthor
Level 3
October 16, 2015

Authors will have replicate auhorization. I just need to get hold of my workflow as soon as he click deactivate button. 

Ravi_KSAuthor
Level 3
October 16, 2015

Can you please share any code example so that I can follow it.

Ravi_KSAuthor
Level 3
October 16, 2015

No. On deactivation I want to trigger my workflow whcih actually connects to Solr server to remove that index.

Level 3
October 16, 2015

whenever a deactivate button/option is clicked (either from sidekick or siteadmin). it is eventually handled by (AFAIK) CQ.wcm.SiteAdmin.internalDeactivatePage function which in turn makes a call to /bin/replicate.json servlets that deactivates the page.

you can override that function to do your stuff.

hoep this helps. Sorry I dont have any code snippets to show right now.

akshat_jain09
Level 2
March 4, 2019

Hey

I tried this approach for an asset deactivation for the same requirement as that of Ravi.

I added a custom step in the "Request for Deactivation" workflow, but the changes did not reflected. However they reflect for the "Schedule deactivation of page/asset" workflow.

Can you please suggest the fix?