Highlighted

Workflow to perform verification and activation on pages

Avatar

Avatar

brucelo

Avatar

brucelo

brucelo

28-11-2018

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.

Replies

Highlighted

Avatar

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831

Avatar

Arun_Patidar

MVP

Total Posts

2.9K

Likes

1.0K

Correct Answer

831
Arun_Patidar
MVP

28-11-2018

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

Highlighted

Avatar

Avatar

brucelo

Avatar

brucelo

brucelo

28-11-2018

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 ...

Highlighted

Avatar

Avatar

brucelo

Avatar

brucelo

brucelo

29-11-2018

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?