I have created a two level folder structure. A folder on the second level has a rule that sets the file type, and an aspect that creates some smart folders and adds/sets some properties on files when they are moved into the folder (very similar to the claims example in the smart folders tutorial - see https://docs.alfresco.com/community/tasks/sf-tutorial.html). When a file is dragged into one of the smart folders, the file is typed, aspects added, and properties populated successfully.

However, I am subsequently unable to move those files into other folders, to either the root (Documents) or second level. Alfresco logs show

Though it is long, it would be good to have the stacktrace attached to your question, so people could check it to find which operation has a bug (and a stackoverflow is almost always a bug / programming error). Also, could you check / verify this issue still exists in the most recent Community GA version (201707)?

Looking at the stacktrace, the issue looks to be caused by an interesting constellation with your smart folder structure. Could it be that your smart folder structure accidentally contains a smart folder which - via its selection query - contains the top level folder and thus creates a circular graph? That's the only way that this stack overflow issue could be caused.

When using traditional folders, Alfresco will prevent the user from creating circular graphs, i.e. create a folder which in itself contains a parent/ancestor folder. But with smart folders, it is not protected against this since the folder query can select anything.

These build the structure in the "Incoming" folder in the below screen grab. The idea is that a user can drag a file into one of the smart folders to have two aspects attached, and some properties set. We would subsequently like to use folders to mark and change the status (availability) of the file, and other properties in it's lifecycle.

On further checking, I can move a file if I remove the kwgt:ataData aspect from it. This aspect has one property, which is a list of values.

So I actually now have had a similar use case on Alfresco 6.0. Interestingly, I did not get your error, but a different one - maybe yours was only present in that particular version. Technically, the implementation of Smart Folders prevents files from being moved from one Smart Folder into another. This limitation was knowingly added by Alfresco in order to enable them to release the first version of Smart Folders in the release that they had targeted. Unfortunately since then, no further update has been made to that feature. I have actually started to implement some patches to the core in order to deal with my use case ("moving around files / folders between Smart Folders to change the status /reclassify them").

You can always move the same files outside of a Smart Folder context. But you need to find the file outside of the Smart Folder in the first place to be able to do that. In my use case, the user only has access to the Smart Folders and the physical folders are actually hidden, so they cannot get to the file in any other context.

Hi Axel, I greatly appreciate you following up to resolve this. I have spent a great deal of time trying to work out what I was doing wrong

Smart folders are very useful and powerful but I think their usefulness is limited by this inhibited functionality. Moving files from folder to folder is a handy way to add and change file properties. Hopefully the functionality will be improved in future versions.

I also made this a topic in the recent Office Hours session in order to find out more about the reasons those limitations are there (they claimed they encountered issues / side effects with transactionality) and how we could best procede to potentially have changes I make integrated in the core.