We are making a call from CMIS API to alfresco to upload documents. Here we are having a rule to move documents from document library into different folders based on metadata. As we are uploading files in bulk, rule gets executed concurrently on multiple files. Due to this, it is trying to create the same folder multiple times. As a result, some of the files are not moving into the destined folder. On a few occasions, all the files are getting uploaded correctly and sometimes, only one or two gets uploaded correctly. If the folder already exists, it shouldn't look to create the folder again but it is trying to do so here. In logs, we see the error "File or folder already exists".
You might have to use a custom rule script or behavior where you can check whether the folder you are trying to create already exists, if not then create the folder else get the nodeRef of the existing folder on intended path and move the file accordingly.
Thanks for your response!
We have a custom rule where we check if the folder already exists or not by using the childByNamePath() in JavaScript. If it returns null, we are creating the folder.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.