cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between the script in 'User Task' and 'Script Task'

jerryli
Champ in-the-making
Champ in-the-making
I am working on an activiti workflow which requires me to post the task id to the outside website.

I can post something outside by following the example here: https://github.com/jbarrez/activiti-advanced-scripting/blob/master/src/test/java/org/activiti/Execut...

However, since I need the user task id, I have to put the same script in the "User Task" which I found very different from the script in the "Task Script".

In the script of "User Task", I can't use the "println" to print something.

Does anyone know any document to well-explain the difference?

Thanks,
Jerry
1 REPLY 1

darkredd
Star Contributor
Star Contributor
Hi,

Please read through this guide. http://www.activiti.org/userguide/#bpmnTask

But in a nutshell, a "user task" is user oriented and therefore will normally wait for a user to trigger for it to complete. However, a script task is executed by the system based on a certain condition being met.
Now the difference is seemingly noticeable in that their execution listeners different: <strong>user =  "tasklistener.ScriptTaskListener"</strong> and <strong>script = "listener.ScriptExecutionListener"</strong> although this depends on the type of script task being called.

Hope this is helpful!