diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index a4c2ef5d89..f56f936a80 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -1648,4 +1648,27 @@ + + + patch.redeploySubmitProcess6 + patch.redeploySubmitProcess.description + 0 + 2002 + 2003 + + + + jbpm + alfresco/workflow/submit_processdefinition.xml + text/xml + + + jbpm + alfresco/workflow/submitdirect_processdefinition.xml + text/xml + + + + + diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties index e08741a4f6..56abc32227 100644 --- a/config/alfresco/version.properties +++ b/config/alfresco/version.properties @@ -19,4 +19,4 @@ version.build=@build-number@ # Schema number -version.schema=2002 +version.schema=2003 diff --git a/config/alfresco/workflow/submit_processdefinition.xml b/config/alfresco/workflow/submit_processdefinition.xml index 4101146143..9dafd0ceee 100644 --- a/config/alfresco/workflow/submit_processdefinition.xml +++ b/config/alfresco/workflow/submit_processdefinition.xml @@ -225,6 +225,11 @@ + + - - + + + + + + + + #{submitfailed == true} + + + #{submitfailed == false} + + + + + + + diff --git a/config/alfresco/workflow/submitdirect_processdefinition.xml b/config/alfresco/workflow/submitdirect_processdefinition.xml index ccb6b14e20..262d97ede0 100644 --- a/config/alfresco/workflow/submitdirect_processdefinition.xml +++ b/config/alfresco/workflow/submitdirect_processdefinition.xml @@ -26,6 +26,11 @@ + + - - + + + + + + + + + + #{submitfailed == true} + + + #{submitfailed == false} + + + + + + diff --git a/config/alfresco/workflow/wcm-workflow-messages.properties b/config/alfresco/workflow/wcm-workflow-messages.properties index 75123525c8..b41bbdcea6 100644 --- a/config/alfresco/workflow/wcm-workflow-messages.properties +++ b/config/alfresco/workflow/wcm-workflow-messages.properties @@ -55,6 +55,8 @@ wcmwf_workflowmodel.type.wcmwf_submitpendingTask.title=Submission Pending wcmwf_workflowmodel.type.wcmwf_submitpendingTask.description=Submission Pending wcmwf_workflowmodel.type.wcmwf_submitcancelledTask.title=Submission Aborted wcmwf_workflowmodel.type.wcmwf_submitcancelledTask.description=Submission Aborted +wcmwf_workflowmodel.type.wcmwf_submitfailedTask.title=Submission Failed +wcmwf_workflowmodel.type.wcmwf_submitfailedTask.description=Submission Failed wcmwf_workflowmodel.property.wcmwf_reviewType.title=Type of Review wcmwf_workflowmodel.property.wcmwf_reviewType.description=Serial or parallel review diff --git a/config/alfresco/workflow/wcmWorkflowModel.xml b/config/alfresco/workflow/wcmWorkflowModel.xml index 5a0c7611d6..8c3294cec0 100644 --- a/config/alfresco/workflow/wcmWorkflowModel.xml +++ b/config/alfresco/workflow/wcmWorkflowModel.xml @@ -172,6 +172,13 @@ + + wcmwf:workflowTask + + wcmwf:submission + + + wcmwf:workflowTask diff --git a/source/java/org/alfresco/repo/avm/wf/AVMSubmitPackageHandler.java b/source/java/org/alfresco/repo/avm/wf/AVMSubmitPackageHandler.java index 4faf3d5a3e..c52ce5638f 100644 --- a/source/java/org/alfresco/repo/avm/wf/AVMSubmitPackageHandler.java +++ b/source/java/org/alfresco/repo/avm/wf/AVMSubmitPackageHandler.java @@ -108,18 +108,9 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements final String tag = (String) executionContext.getContextInstance().getVariable("wcmwf_label"); final Map dnsProperties = this.fAVMService.queryStorePropertyKey(targetPath.split(":")[0], QName.createQName(null, ".dns%")); - String webProject = dnsProperties.keySet().iterator().next().getLocalName(); - webProject = webProject.substring(webProject.lastIndexOf('.') + 1, webProject.length()); + String localName = dnsProperties.keySet().iterator().next().getLocalName(); + final String webProject = localName.substring(localName.lastIndexOf('.') + 1, localName.length()); final List stagingDiffs = fAVMSyncService.compare(pkgPath.getFirst(), pkgPath.getSecond(), -1, targetPath, null); - for (final AVMDifference diff : stagingDiffs) - { - String p = diff.getSourcePath(); - if (from != null && from.length() != 0) - { - p = from + p.substring(pkgPath.getSecond().length()); - } - this.recursivelyRemoveLocks(webProject, -1, p); - } // Allow AVMSubmitTransactionListener to inspect the staging diffs // so it can notify the virtualization server via JMX if when this @@ -134,13 +125,22 @@ public class AVMSubmitPackageHandler extends JBPMSpringActionHandler implements // may not have permission to flatten the store the workflow was submitted from AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork() { - public Object doWork() throws Exception { fAVMSyncService.update(stagingDiffs, null, false, false, true, true, tag, description); AVMDAOs.Instance().fAVMNodeDAO.flush(); fAVMSyncService.flatten(pkgPath.getSecond(), targetPath); - + + for (final AVMDifference diff : stagingDiffs) + { + String p = diff.getSourcePath(); + if (from != null && from.length() != 0) + { + p = from + p.substring(pkgPath.getSecond().length()); + } + recursivelyRemoveLocks(webProject, -1, p); + } + // flatten source folder where changes were submitted from if (from != null && from.length() > 0) { diff --git a/source/test-resources/jbpmresources/test_exception.xml b/source/test-resources/jbpmresources/test_exception.xml new file mode 100644 index 0000000000..6289704549 --- /dev/null +++ b/source/test-resources/jbpmresources/test_exception.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + #{bpm_assignee} + + + + + + + + + + + + + + + + + + + + + + + #{submitexception == true} + + + #{submitexception == false} + + + + + + + + + + +