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

Workflow list restriction per path

Avatar

Level 2

Hey guys. I would like to know is there any way to restrict the workflow list (which is available from SiteAdmin) per page path? Maybe, the same way like the allowedParents property does for templates. 

So, to be clear:

1. As a user I want to open SiteAdmin.
2. Select a custom page page, e.g. /content/my-project/my-page.
3. Click the "Workflow..." item from the toolbar and see a custom list of available workflows only per this page (or per this page template) which should be different from e.g.
/content/my-project/another-page (which has another path/template).

AEM 5.6

1 Accepted Solution

Avatar

Correct answer by
Level 10

As of now it lists all the workflow based on the Logged in User's ACL and it allows Users to start the workflow accordingly. so as @edubey mentioned, you might have to customize the current js which is populating the list and add another parameter to filter the workflow list

View solution in original post

8 Replies

Avatar

Level 10
No, there is no such feature in aem as of now. You need to  customize its behaviour.      

Avatar

Level 2

edubey wrote...

Hi,

You should probably take a look at articles who talks about applying ACL on Workflows..

Thanks

 

Thx edubey for the hint, It can be used as a good workaround. Maybe there is a way to achieve the same results but without changing permissions?

Avatar

Level 10

If you do not wish to go for ACLs, then another solution would can be override AEM default behavior,

Take a look at this file [1]  (w.r.t AEM 5.6.1), in line no. 740 you would see CQ.wcm.SiteAdmin.startWorkflow. This defines the workflow dialog and list.

Override this in your /apps/project/file, and modify this as your need.

[1] /libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js

Avatar

Level 2

So,edubey, you mean, there is no way to inject (without modifying AEM's code) something like predicate, to filter available workflows for current (or all selected) pages, using, lets say, template of this(these) pages?

edubey wrote...

If you do not wish to go for ACLs, then another solution would can be override AEM default behavior,

Take a look at this file [1]  (w.r.t AEM 5.6.1), in line no. 740 you would see CQ.wcm.SiteAdmin.startWorkflow. This defines the workflow dialog and list.

Override this in your /apps/project/file, and modify this as your need.

[1] /libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js

 

 

Avatar

Correct answer by
Level 10

As of now it lists all the workflow based on the Logged in User's ACL and it allows Users to start the workflow accordingly. so as @edubey mentioned, you might have to customize the current js which is populating the list and add another parameter to filter the workflow list

Avatar

Level 10

Agreed, we should be putting effort on customizing only if its a 'MUST HAVE'. Else anyhow the author would know how the product works and they should be able to handle it

Avatar

Level 2

Thank you edubey and bsloki, I, actually, already investigated this option. However, it seems to be not really good solution, because customising of default scripts will lead to issues during installing hotfixes from Adobe and/or upgrading to new versions.

But if it is the only way - we should live with it.

 

Thank you.

 

bsloki wrote...

As of now it lists all the workflow based on the Logged in User's ACL and it allows Users to start the workflow accordingly. so as @edubey mentioned, you might have to customize the current js which is populating the list and add another parameter to filter the workflow list