Is any limit for folder rule script execution

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

Is any limit for folder rule script execution

Jump to solution

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.setInheritsPermissions(false);

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

main();

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

The rule description is

setpermissions

Description:

Active
Run in background
Rule applied to subfolder
When:

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)

1 Solution

Accepted Solutions
Master

Re: Is any limit for folder rule script execution

Jump to solution

Folder rules do not have any builtin limitations regarding depth, but there is an aspect rule:ignoreInheritedRules which can be applied to a folder and if applied, rules will not be inherited.

View solution in original post

1 Reply
Master

Re: Is any limit for folder rule script execution

Jump to solution

Folder rules do not have any builtin limitations regarding depth, but there is an aspect rule:ignoreInheritedRules which can be applied to a folder and if applied, rules will not be inherited.

View solution in original post