cancel
Showing results for 
Search instead for 
Did you mean: 

How to do parallel review task with activiti task like alfresco review task?

prasobhraj
Star Contributor
Star Contributor

Hi,

I want to implement a parallel review workflow same as the default parallel workflow in alfresco with selected users (Review and Approve one or more reviewers). is it possible to do the same with activity user task? if yes please advice how to configure the user task

Thanks,

Prasobhraj

1 ACCEPTED ANSWER

Sorry guys. actually i need to do isSequential="false" for my requirment. this is cleared.

Thanks

View answer in original post

2 REPLIES 2

prasobhraj
Star Contributor
Star Contributor

I had tried with sequential =true in task configuration. its working . but the issue am facing is tasks not showing as parallel workflow tasks. its taking one by one as per the selection of users. but in default alfresco workflow its showing as parallel. my task configuration is as given below

    <userTask id="usertask2" name="Review by Assigned users" activiti:assignee="${reviewAssignee.properties.userName}" activiti:formKey="mywf:CommonForm">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('mywf_workflowtransition', task.getVariable('mywf_workflowtransition'));
task.setVariable('bpm_outcome', task.getVariable('mywf_workflowtransition'));
execution.setVariable('bpm_comment','');</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if(task.getVariableLocal('mywf_workflowtransition') == 'Approved') {
var newApprovedCount = mywf_approveCount + 1;
execution.setVariable('mywf_approveCount', newApprovedCount);
}
var newReviewedCount = mywf_reviewCount + 1;
execution.setVariable('mywf_reviewCount', newReviewedCount);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="true" activiti:collection="mywf_notify_user" activiti:elementVariable="reviewAssignee">
        <completionCondition>${mywf_reviewCount == mywf_totuser}</completionCondition>
      </multiInstanceLoopCharacteristics>
    </userTask>

Sorry guys. actually i need to do isSequential="false" for my requirment. this is cleared.

Thanks