Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

trigger workflow on delete

Avatar

Level 4

Hi,

I need to trigger a workflow when the user deletes a page on publish instance.

[img]Untitled.png[/img]

Now i'm on author instance and i delete a published page under /content/gimb_it/x/y, the workflow isn't triggered.

Why?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 8

In screenshot you provided you set the run mode of the trigger to Publish. When you set the run mode to Publish that means that workflow will on be kicked off on a server that includes the Publish run mode. Since you author server has a run mode of Author that workflow trigger will never start a workflow - regardless of where you delete the page. 

If you set up the same launcher on a publish instance it would would start a workflow - but only on the publish server - not on the author server. You probably want the to set the run mode to Author not Publish. Try that and you should see the results you expect (assuming of course that the delete action is happening on the author server and not on the publish server). 

View solution in original post

4 Replies

Avatar

Level 10

that because, this workflow is activated only for 'publish' instance

Avatar

Level 4

sure,

I'm in siteadmin of CQ5.5.

I have created a trigger that runs when a page publish side is deleted. (img of the previous post)

I think that if i delete a published page in author instance the same page will be deleted publish side.

But if i delete the page the trigger doesn't run.

Why?

Avatar

Correct answer by
Level 8

In screenshot you provided you set the run mode of the trigger to Publish. When you set the run mode to Publish that means that workflow will on be kicked off on a server that includes the Publish run mode. Since you author server has a run mode of Author that workflow trigger will never start a workflow - regardless of where you delete the page. 

If you set up the same launcher on a publish instance it would would start a workflow - but only on the publish server - not on the author server. You probably want the to set the run mode to Author not Publish. Try that and you should see the results you expect (assuming of course that the delete action is happening on the author server and not on the publish server).