Fix for ALF-3081: "Failed to signal transition from workflow "Expired content in 'Test'" task when click "Task Done"s"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22572 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2010-09-16 07:33:40 +00:00
parent fc5e0760de
commit 7a012c7d1b

View File

@@ -134,6 +134,8 @@ public class ManageChangeRequestTaskDialog extends ManageTaskDialog
for (AVMDifference diff : diffs)
{
// move the lock for this path from the user workflow sandbox to the users main store
// we need to do this because the workflow endTask will trigger deletion of the (user)
// workflow store which will in turn recursively remove all the locks.
String diffSourcePath = diff.getSourcePath();
String diffSourceAvmStore = WCMUtil.getWebProjectStoreIdFromPath(diffSourcePath);
String sourceWebProject = WCMUtil.getWebProjectStoreId(diffSourceAvmStore);
@@ -147,12 +149,12 @@ public class ManageChangeRequestTaskDialog extends ManageTaskDialog
" Source: " + diffSourcePath + "\n" +
" Target: " + diffTargetPath);
}
// Modify the lock
Map<String, String> lockAttributes = Collections.singletonMap(
WCMUtil.LOCK_KEY_STORE_NAME, diffTargetAvmStore);
WCMUtil.LOCK_KEY_STORE_NAME, diffTargetAvmStore);
boolean modified = this.getAvmLockingService().modifyLock(
sourceWebProject, AVMUtil.getStoreRelativePath(diffSourcePath), username,
sourceWebProject, null, lockAttributes);
sourceWebProject, AVMUtil.getStoreRelativePath(diffSourcePath), username,
sourceWebProject, AVMUtil.getStoreRelativePath(diffTargetPath), lockAttributes);
if (modified && logger.isDebugEnabled())
{
logger.debug(