MultiInstancesBehavior can't be started when changing document properties in serial workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2015 05:05 AM
Hello,
I need to change some document properties in my serial workflow, but when the first person approved the review task i've submitted the multi instanced behavior failed to start (org.activiti.engine.ActivitiException: Could not execute inner activiti behavior of multi instance behavior
). But if I comment the document change properties, the workflow is running as usual. below is my code :
I'm using alfresco share version 5.1 enterprise edition.
Thanks and regards,
Nathan.
I need to change some document properties in my serial workflow, but when the first person approved the review task i've submitted the multi instanced behavior failed to start (org.activiti.engine.ActivitiException: Could not execute inner activiti behavior of multi instance behavior
). But if I comment the document change properties, the workflow is running as usual. below is my code :
<userTask id="reviewTask" name="Review Task" activiti:assignee="${reviewAssignee.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate); if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority; bpm_package.children[0].properties["ct:assigned"] = reviewAssignee.properties.userName;; bpm_package.children[0].save(); ]]></activiti:string> </activiti:field> </activiti:taskListener> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[if(task.getVariableLocal('wf_reviewOutcome') == 'Approve') { var newApprovedCount = wf_approveCount + 1; var newApprovedPercentage = (newApprovedCount / wf_reviewerCount) * 100; execution.setVariable('wf_approveCount', newApprovedCount); execution.setVariable('wf_actualPercent', newApprovedPercentage); }else{ execution.setVariable('wf_actualPercent', wf_requiredApprovePercent); }]]></activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> <multiInstanceLoopCharacteristics isSequential="true" activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee"> <completionCondition>${wf_actualPercent >= wf_requiredApprovePercent}</completionCondition> </multiInstanceLoopCharacteristics> </userTask>
I'm using alfresco share version 5.1 enterprise edition.
Thanks and regards,
Nathan.
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2015 05:47 AM
already solved, I forgot to change the document permissions.
Thanks,
Nathan
Thanks,
Nathan
