Fix for CLOUD-1824 (partial).

This fix addresses the creation of 'ghost tasks' - or more correctly, the failure to properly clean up ghost tasks.
There was already code to automatically delete invitation tasks when a site was deleted, but it was no longer working and had no test coverage.

This checkin adds a test case for this issue and also fixes it.
I also added & improved logging in various places.
The bug was in ActionExecuterAbstractBase, where an action run on a non-existent, but non-null, NodeRef was considered to be run on a locked node and hence not run.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@52158 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2013-07-04 18:13:56 +00:00
parent e4b1be9f43
commit 437ba4e516
5 changed files with 224 additions and 14 deletions

View File

@@ -241,8 +241,18 @@ public abstract class ActionExecuterAbstractBase extends ParameterizedItemAbstra
// Only execute the action if this action is read only or the actioned upon node reference doesn't
// have a lock applied for this user.
if ((baseNodeService == null || actionedUponNodeRef == null || mlAwareNodeService.exists(actionedUponNodeRef)) && // Not all actions are node based
(ignoreLock || !LockUtils.isLockedAndReadOnly(actionedUponNodeRef, lockService)))
boolean nodeIsLockedForThisUser = false;
// null nodeRefs can't be locked and some actions can be run against 'null' nodes.
// non-existent nodes can't be locked.
if (!ignoreLock &&
actionedUponNodeRef != null &&
mlAwareNodeService.exists(actionedUponNodeRef))
{
nodeIsLockedForThisUser = LockUtils.isLockedAndReadOnly(actionedUponNodeRef, lockService);
}
if ( !nodeIsLockedForThisUser)
{
// Execute the implementation
executeImpl(action, actionedUponNodeRef);