cancel
Showing results for 
Search instead for 
Did you mean: 

Infinite onContentUpdate loop when a node is versionable

dwarren
Champ in-the-making
Champ in-the-making
Version: Alfresco Enterprise 3.0.0 (trial)

We have several policies that are registered to fire on the onContentUpdate event of some node types.  Each policy reads the node content and creates a property.

These policies work fine for nodes that are not versionable.   However, if we make a node versionable, we get into an infinite loop:  the onContentUpdate event just keeps firing.  The first time, newContent is false.  Every time after that, newContent is true.

It seems like the action of reading the node's content (done in each policy) is causing the onContentUpdate event to be triggered again - only when the node is versionable.

I did a bit of searching through the forums, but could not find a similar problem.  Has anyone else encountered this?  If so, how have you avoided it?
1 REPLY 1

dwarren
Champ in-the-making
Champ in-the-making
Found the problem:   our policies were running on the previous version of a node (workspace://version2store) as well as the current version (workspace://SpacesStore).   I put a check in the onContentUpdate() method of our policies to only do work if the node's Store is workspace://SpacesStore.  This fixed the issue.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.