mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Feature 2.4/rm 2996 upload unfiled reacords with rule on file plan RM-2996 - Files can not be uploaded in Unfiled Records if the File Plan has rules defined applying to sub-folders The execution of rules as well as RM's RecordsManagementContainer.onCreateChildAssociation behavior fire before transaction commit and is unpredictable which one will run first. If the rule runs first the newly uploaded node doesn't have rma:filePlanComponent set at the time the method shouldRuleBeAppliedToNode executes. Calling recordService.isFiled(nodeRef)) will trigger capability check among which ViewRecordsCapability will check if the record has the rma:filePlanComponent aspect. As a fix I ran the code from shouldRuleBeAppliedToNode method as system to avoid capability check. I am aware the fix is a workaround but I think this is part of a bigger problem. The rules are fired before transaction commit and may conflict with other behaviors registered on transaction commit. However, we cannot add the aspect earlier in RM. See merge request !37