Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

aem

adobe

I would need to call a workflow whenever a content author clicks activate on a page. The workflow would then send a notification to the administrator, who then proceeds to activate the page.

Let me explain this with some more detail. There are 2 parts to this

i) Whenever a content author is done modifying a page, he would then proceed to click "Activate Page" from either the sidekick or from page properties on the siteadmin. By doing so, he is not activating the page straight away but calling a workflow.

ii) The workflow will send out a notification to the admin, who then decides to activate the page. This bit is fairly ordinary, so no issues here.

All of this is an effort to make sure that there is nothing published/activated unless it has been reviewed by an admin.

I tried setting up a ReplicationEvent listener that would call a workflow. What happens is that the page is already activated before the workflow is called; the occurrence of a ReplicationEvent is only after said Replication Event (i.e Activate) occurs (Obviously!).

As stated, I need to make sure that the page isn't actually activated when the user clicks activate; which means I need to modify what the activate button does exactly.

I have tried looking up online, but found nothing, which leads me to believe that most of CQ5's siteadmin code is hidden from us and cannot be modified (and with good reason).

So is there anything else that anyone can think of which may help me to achieve my requirement? Or should I give this up as a lost cause?

Thanks in advance and apologies for the long post

like image 638
bongman1612 Avatar asked Sep 18 '13 05:09

bongman1612


People also ask

How to activate a workflow from a list page?

The Activate workflow form is displayed. Click Activate the new version. Follow these steps to activate a workflow from a list page. Open the module that contains the workflow that you want to activate. Click Setup > [Module name] workflows. A list page is displayed. Select the workflow to activate.

What happens after I activate a workflow?

After you activate a workflow, users can submit documents to the workflow for processing. There can be several versions of a specific workflow, but only one version can be the active version. Use the following procedures to activate a workflow. The workflow version that you want to activate must be free of errors and warnings.

How to activate a workflow at runtime in Dynamics AX?

After you create a workflow in Microsoft Dynamics AX, you must implement a way to activate the workflow at runtime to display the workflow in your application. Application users start a workflow when they click the Submit button on forms that are enabled for workflow and have a valid workflow configuration.

How do I start a workflow from an application?

Application users start a workflow when they click the Submit button on forms that are enabled for workflow and have a valid workflow configuration. The Submit button is controlled by an action menu item set on the SubmitToWorkflowMenuItem property for the workflow type.


1 Answers

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.

like image 148
bfitzpatrick Avatar answered Oct 08 '22 20:10

bfitzpatrick