AnsweredAssumed Answered

Is any limit for folder rule script execution

Question asked by skushnerenko on Jan 17, 2019
Latest reply on Jan 18, 2019 by afaust

We have repository with tree folder structure, where there is only one parent folder per a huge set of subfolders number of which is constantly growing.

So, there are thousands of folders with one parent folder, and there are few such folder conglomerats.

On creation of each folder background folder rule script is executed. The rule is on root folder.

function main()
if (document.isContainer)

document.setPermission("Consumer", "GROUP_someGroup1");
document.setPermission("Coordinator", "GROUP_someGroup2");
document.setPermission("Coordinator", "GROUP_someGroup3");


The purpose is to turn off inheritence and to add default groups to each subfolder.

The rule description is



Run in background
Rule applied to subfolder

Items are created or enter this folder

If all criteria are met:

Is of type (or sub type) 'Folder'

Perform Action:

Execute 'setpermisions.js' script

It is done via rule, because it is not possible to turn off inheritence via CMIS.


Till now we have never problems with such folder rule execution, so there we no even need to make any error logging for them.

But we have one occasion, when one subfolder was created and default groups were not added. 

So the question is, does folder rule mechanism have some limitation?

Alfresco Community (Build: 201612)