From 2884fce276f922ee992039467db070cf91d63ad7 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Fri, 13 Jul 2007 00:33:49 +0000 Subject: [PATCH] Fix for WCM-537: Changes to layer are now comitted in first transaction i.e. prior to informing virtual server of workflow sandbox. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6237 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/web/bean/wcm/SubmitDialog.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java b/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java index 627e285454..03dae31deb 100644 --- a/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java +++ b/source/java/org/alfresco/web/bean/wcm/SubmitDialog.java @@ -382,7 +382,7 @@ public class SubmitDialog extends BaseDialogBean try { // create the workflow sandbox firstly - txnHelper.doInTransaction(sandboxCallback); + txnHelper.doInTransaction(sandboxCallback, false, true); if (this.sandboxInfo != null) { @@ -395,7 +395,7 @@ public class SubmitDialog extends BaseDialogBean try { // start the workflow - txnHelper.doInTransaction(workflowCallback); + txnHelper.doInTransaction(workflowCallback, false, true); } catch (Throwable err) { @@ -532,6 +532,18 @@ public class SubmitDialog extends BaseDialogBean this.srcPaths.add(srcPath); } + + String workflowMainStoreName = sandboxInfo.getMainStoreName(); + List diffs = new ArrayList(srcPaths.size()); + for (final String srcPath : srcPaths) + { + diffs.add(new AVMDifference(-1, srcPath, -1, + AVMUtil.getCorrespondingPath(srcPath, workflowMainStoreName), + AVMDifference.NEWER)); + } + + // write changes to layer so files are marked as modified + avmSyncService.update(diffs, null, true, true, false, false, null, null); } else {