cancel
Showing results for 
Search instead for 
Did you mean: 

Rule executed multiple times

cgiuliano
Champ in-the-making
Champ in-the-making
Hello everybody,

I'm working on a Share site, where I've defined a rule on a folder, using the "Items are deleted or leave this folder" trigger. The rule executes a script just logging an informative message:
logger.log(document.name);
The rule execution is NOT in background and is tied to contents of type cm:content.
While it works in the expected way when I delete a file, the script is executed 12 times whenever I move a document from inside the folder to another folder.

Does any one know why it happens?

Thank you.
Carlo
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Is it allways 12 times?   If not then it could simply be retrying the transaction after some contention.

If it is allways 12 times then sounds like a small bug somewhere.

cgiuliano
Champ in-the-making
Champ in-the-making
Hello,
Yes, I've always observed it repeating exactly 12 times, trying with different document and folder.
By activating the logging on the RuleTypeImpl class, I can see 12 times the message

Triggering rule TestRule on
<doc_path>
and then further 2 times the following message (with no execution of the rule):

No rules to trigger on
<doc_path>

Carlo