Discrepancy in workflow tutorial for script task vs service task
abhinavmishra14 opened this issue · 1 comments
Discrepancy in workflow tutorial for script task vs service task.
In this tutorial: http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html
Script Task is used in the process diagram but in the section where extension elements are defined, a service task configuration is being used. The confusion arise after i see the serviceTask tag in the xml. We have a Service Task option as well in tasks pallet where we can choose which task we want to use.
<serviceTask id="alfrescoScripttask1" name="Alfresco Script Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="script"> <activiti:string>logger.log("The outcome of the review task is: " + wf_reviewOutcome);</activiti:string> </activiti:field> </extensionElements> </serviceTask>
The text, the diagram, and the XML are correct. If you drag a plain "Service Task" from the palette onto the canvas and look at the XML you'll see:
<scriptTask id="scripttask1" name="PLAIN SCRIPT TASK" activiti:autoStoreVariables="false"></scriptTask>
But if you drag an "Alfresco Script Task" on the canvas, the XML looks like:
<serviceTask id="alfrescoScripttask2" name="ALFRESCO SCRIPT TASK" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"></serviceTask>
Which is correct. An Alfresco Script Task is a serviceTask with an Alfresco Script Delegate as its implementation class.