When i clicked any outcome button its complete the task . i have more than one button .Can i call different event on button click?
Hi, Dharmraj Gurjar
you can execute your script based on the outcome button click refer this example
<userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:activitiReviewTask"> <extensionElements> <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"> <activiti:field name="script"> <activiti:string><![CDATA[ //getting your task outcome , you can get the outcome button value by using this // wf_reviewOutcome your modelPrefix_outcomeProperty task.getVariable('wf_reviewOutcome'); ]]></activiti:string> </activiti:field> </activiti:taskListener> </extensionElements> </userTask>
Thanks,Kalpesh,ContCentric