mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -382,7 +382,7 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// create the workflow sandbox firstly
|
// create the workflow sandbox firstly
|
||||||
txnHelper.doInTransaction(sandboxCallback);
|
txnHelper.doInTransaction(sandboxCallback, false, true);
|
||||||
|
|
||||||
if (this.sandboxInfo != null)
|
if (this.sandboxInfo != null)
|
||||||
{
|
{
|
||||||
@@ -395,7 +395,7 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// start the workflow
|
// start the workflow
|
||||||
txnHelper.doInTransaction(workflowCallback);
|
txnHelper.doInTransaction(workflowCallback, false, true);
|
||||||
}
|
}
|
||||||
catch (Throwable err)
|
catch (Throwable err)
|
||||||
{
|
{
|
||||||
@@ -532,6 +532,18 @@ public class SubmitDialog extends BaseDialogBean
|
|||||||
|
|
||||||
this.srcPaths.add(srcPath);
|
this.srcPaths.add(srcPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String workflowMainStoreName = sandboxInfo.getMainStoreName();
|
||||||
|
List<AVMDifference> diffs = new ArrayList<AVMDifference>(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
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user