When i clicked any outcome button its complete the task . i have more than one button .Can i call different event on button click?
Solved! Go to Solution.
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
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
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.