Start a workflow on page activation without activating the page in CQ5

梦想的初衷 提交于 2019-12-03 13:40:02

You could put the authors in a user group that does not have replication permissions. When an author tries to activate a page without the permissions, it automatically starts the request for activation workflow. I think the default config has one step for content approval and a separate step for activation. Both steps are mapped to the administrator user group. The workflows are at http://localhost:4502/libs/cq/workflow/content/console.html and you can double click on a model to edit it.

You can use replication preprocessor (example) which is something like replication event listener but is invoked before the activation is done. Throwing exception in the preprocess() method will stop activation process and display exception message.

However, more elegant option is to use ACL to forbid an user to activate the page. After that, clicking Activate button won't publish the page but will rather invoke Request for Activation workflow.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!