diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties index 9147ef9792..376f3d57e7 100644 --- a/config/alfresco/messages/patch-service.properties +++ b/config/alfresco/messages/patch-service.properties @@ -476,4 +476,6 @@ patch.syncSetDefinitionsContainer.description=Patch to add the root folder for S patch.swsdpPatch.description=Patch to fix up the Sample: Web Site Design Project. patch.swsdpPatch.success=Successfully patched the Sample: Web Site Design Project. patch.swsdpPatch.skipped=Skipped, not required. -patch.swsdpPatch.missingSurfConfig=surf-config folder is not present in Sample: Web Site Design Project. \ No newline at end of file +patch.swsdpPatch.missingSurfConfig=surf-config folder is not present in Sample: Web Site Design Project. + +patch.redeployParallelActivitiWorkflows.description=Patch that redeploys both parallel activiti workflows, completion-condition now takes into account if minimum approval percentage can still be achived. \ No newline at end of file diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml index 77bae25157..b55cc790f8 100644 --- a/config/alfresco/patch/patch-services-context.xml +++ b/config/alfresco/patch/patch-services-context.xml @@ -3196,5 +3196,27 @@ + + + patch.redeployParallelActivitiWorkflows + patch.redeployParallelActivitiWorkflows.description + 0 + 6009 + 6010 + + + + activiti + alfresco/workflow/parallel-review.bpmn20.xml + text/xml + + + activiti + alfresco/workflow/parallel-review-group.bpmn20.xml + text/xml + + + + diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties index b43ed78e90..8ba94036b4 100644 --- a/config/alfresco/version.properties +++ b/config/alfresco/version.properties @@ -19,4 +19,4 @@ version.build=@build-number@ # Schema number -version.schema=6009 +version.schema=6010 diff --git a/config/alfresco/workflow/parallel-review-group.bpmn20.xml b/config/alfresco/workflow/parallel-review-group.bpmn20.xml index fd459665d5..a82c0f4e0a 100644 --- a/config/alfresco/workflow/parallel-review-group.bpmn20.xml +++ b/config/alfresco/workflow/parallel-review-group.bpmn20.xml @@ -13,7 +13,11 @@ execution.setVariable('wf_approveCount', 0); + execution.setVariable('wf_rejectCount', 0); + execution.setVariable('wf_actualPercent', 0); + execution.setVariable('wf_actualRejectPercent', 0); + execution.setVariable('wf_requiredPercent', wf_requiredApprovePercent); @@ -62,11 +66,17 @@ if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') { - var newApprovedCount = wf_approveCount + 1; + var newApprovedCount = wf_approveCount + 1; var newApprovedPercentage = (newApprovedCount / wf_reviewerCount) * 100; execution.setVariable('wf_approveCount', newApprovedCount); execution.setVariable('wf_actualPercent', newApprovedPercentage); + } else { + var newRejectCount = wf_rejectCount + 1; + var newRejectPercentage = (newRejectCount / wf_reviewerCount) * 100; + + execution.setVariable('wf_rejectCount', newRejectCount); + execution.setVariable('wf_actualRejectPercent', newRejectPercentage); } @@ -83,7 +93,7 @@ wf_groupMembers - ${wf_actualPercent >= wf_requiredApprovePercent} + ${wf_actualPercent >= wf_requiredApprovePercent || wf_requiredApprovePercent > (100 - wf_actualRejectPercent)} @@ -118,6 +128,8 @@ task.setVariableLocal('wf_requiredPercent', wf_requiredPercent); task.setVariableLocal('wf_actualPercent', wf_actualPercent); task.setVariableLocal('wf_approveCount', wf_approveCount); + task.setVariableLocal('wf_rejectCount', wf_rejectCount); + task.setVariableLocal('wf_actualRejectPercent', wf_actualRejectPercent); @@ -146,6 +158,8 @@ task.setVariableLocal('wf_requiredPercent', wf_requiredPercent); task.setVariableLocal('wf_actualPercent', wf_actualPercent); task.setVariableLocal('wf_approveCount', wf_approveCount); + task.setVariableLocal('wf_rejectCount', wf_rejectCount); + task.setVariableLocal('wf_actualRejectPercent', wf_actualRejectPercent); diff --git a/config/alfresco/workflow/parallel-review.bpmn20.xml b/config/alfresco/workflow/parallel-review.bpmn20.xml index 546b1a706f..8a6528ec4e 100644 --- a/config/alfresco/workflow/parallel-review.bpmn20.xml +++ b/config/alfresco/workflow/parallel-review.bpmn20.xml @@ -13,7 +13,11 @@ execution.setVariable('wf_approveCount', 0); - execution.setVariable('wf_actualPercent', 0); + execution.setVariable('wf_rejectCount', 0); + + execution.setVariable('wf_actualPercent', 0); + execution.setVariable('wf_actualRejectPercent', 0); + execution.setVariable('wf_reviewerCount', bpm_assignees.size()); execution.setVariable('wf_requiredPercent', wf_requiredApprovePercent); @@ -44,11 +48,17 @@ if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') { - var newApprovedCount = wf_approveCount + 1; + var newApprovedCount = wf_approveCount + 1; var newApprovedPercentage = (newApprovedCount / wf_reviewerCount) * 100; execution.setVariable('wf_approveCount', newApprovedCount); execution.setVariable('wf_actualPercent', newApprovedPercentage); + } else { + var newRejectCount = wf_rejectCount + 1; + var newRejectPercentage = (newRejectCount / wf_reviewerCount) * 100; + + execution.setVariable('wf_rejectCount', newRejectCount); + execution.setVariable('wf_actualRejectPercent', newRejectPercentage); } @@ -65,7 +75,7 @@ bpm_assignees - ${wf_actualPercent >= wf_requiredApprovePercent} + ${wf_actualPercent >= wf_requiredApprovePercent || wf_requiredApprovePercent > (100 - wf_actualRejectPercent)}