11-09-2017 07:16 AM
When i clicked any outcome button its complete the task . i have more than one button .Can i call different event on button click?
11-13-2017 03:53 AM
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
11-13-2017 03:53 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.