Expand my Community achievements bar.

Workflow to perform verification and activation on pages

Avatar

Level 1

I have created a custom workflow A that will verify the content of a page, then either activate the page immediately or go to an approval step before activation(i.e. If a *specific* config is used).

But the problem is, after removing the replication permission of the target folder, instead of using the custom workflow A to trigger page activation, some of the users (1) click the Activate Page button in the sidekick, which will trigger the OOB Request Request for Activation workflow. And some of them (2) mistakenly chose the Request for Activation workflow. Note that with custom workflow A, most pages will be activated immediately. But thanks to (1) and (2), the content admin received lotssss of approval requests.

Thus, my question are, is there any suggestions to prevent (1) and (2)? Like disabling the Activate Page button in the sidekick if the user do not have the replication permission.

I did try to use the workflow launcher. But seems that workflows triggered by workflow launcher are not able to stop the event itself (i.e. the activate action).

Thank you so much for your help.

3 Replies

Avatar

Community Advisor

You can remove the read permission of the workflow from useradmin console for the users whom you don't want to make it available to use.

/etc/workflow/models/request_for_activation



Arun Patidar

Avatar

Level 1

That works! Thanks!!!

And I was able to disable the Activate Page button in the sidekick menu (if the user does not have the replication permission) with a script that similar to the one suggested here:

Experiencing Adobe Experience Manager - Day CQ: AEM CQ 56 - Disable SideKick Activate, Deactivate fo...

Beginners Guide: AEM: Disable Activate and Deactivate Buttons in Sidekick based on user persmission ...

Avatar

Level 1

However the users asked that is it possible to keep the Activate button enabled, and automatically trigger the workflow verification after they clicked the Activate button. They think this is the *ideal* solution as those content authors don't have to change their behavior (i.e. just click the Activate button rather than choosing and starting the custom workflow A).

Maybe I will need to re-investigate the workflow launcher approach, but is a workflow instance triggered by workflow launcher event (i.e. my custom workflow A triggered by activate action) even possible to stop the event itself (i.e. the activate action)?

Or would you recommend me to use replication event handler and preprocessor?