cancel
Showing results for 
Search instead for 
Did you mean: 

Help while unit testing

majorschultz
Champ in-the-making
Champ in-the-making

I'm still learning the ways of activiti and I came across the following issue when testing my simple workflow (START EVENT-> USER TASK->EMAIL TASK->USER TASK->END EVENT) taskService only finds my first user task, thereafter I cannot complete the second one. Any clues?
2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator
Since you have a sequential flow in your process, you need to complete the first user task <code>taskService.complete(taskId)</code> before you can query your second task. Please check this - www.jorambarrez.be/blog/2012/09/24/how-to-write-a-unit-test/

majorschultz
Champ in-the-making
Champ in-the-making
Thanks a lot, It worked perfectly.