diff --git a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServiceImpl.java b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServiceImpl.java index e2bdd33280..70a08a409c 100644 --- a/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServiceImpl.java +++ b/rm-community/rm-community-repo/source/java/org/alfresco/module/org_alfresco_module_rm/hold/HoldServiceImpl.java @@ -229,7 +229,7 @@ public class HoldServiceImpl extends ServiceBaseImpl { // remove the freeze aspect from the node //set in transaction cache in order not to trigger update policy when removing the aspect - transactionalResourceHelper.getSet(nodeRef).add("frozen"); + transactionalResourceHelper.getSet("frozen").add(nodeRef); nodeService.removeAspect(nodeRef, ASPECT_FROZEN); } @@ -245,7 +245,7 @@ public class HoldServiceImpl extends ServiceBaseImpl { // remove the freeze aspect from the node //set in transaction cache in order not to trigger update policy when removing the aspect - transactionalResourceHelper.getSet(record).add("frozen"); + transactionalResourceHelper.getSet("frozen").add(record); nodeService.removeAspect(record, ASPECT_FROZEN); } } @@ -721,19 +721,17 @@ public class HoldServiceImpl extends ServiceBaseImpl // run as system so we don't run into further permission issues // we already know we have to have the correct capability to get here authenticationUtil.runAsSystem((RunAsWork) () -> { - { + // remove from hold + //set in transaction cache in order not to trigger update policy when removing the child association + transactionalResourceHelper.getSet("frozen").add(nodeRef); + nodeService.removeChild(hold, nodeRef); - // remove from hold - //set in transaction cache in order not to trigger update policy when removing the child association - transactionalResourceHelper.getSet(nodeRef).add("frozen"); - nodeService.removeChild(hold, nodeRef); + // audit that the node has been remove from the hold + // TODO add details of the hold that the node was removed from + recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD); - // audit that the node has been remove from the hold - // TODO add details of the hold that the node was removed from - recordsManagementAuditService.auditEvent(nodeRef, AUDIT_REMOVE_FROM_HOLD); + return null; - return null; - } }); } }