cancel
Showing results for 
Search instead for 
Did you mean: 

the question of API

yhxjldx
Champ in-the-making
Champ in-the-making
I read acitviti user guide and copy "Task task = taskService.createTaskQuery().singleResult();taskService.complete(task.getId()); "from user guide. I make a workflow and start it. The workflow has been finished successfully. but there are some error info. error info is  Exception in thread "main" java.lang.NullPointerException.
I debug project . and  find that "Task task = taskService.createTaskQuery().singleResult()" return is null.  so taskService.complete(task.getId()) is error .

Is the taskService.complete(task.getId())  necessary?  if the taskService.complete(task.getId())  is necessary . what should i do ?
2 REPLIES 2

dawnworld
Champ in-the-making
Champ in-the-making
i also encountered  the same problem,do you solve it?

yhxjldx
Champ in-the-making
Champ in-the-making
i also encountered  the same problem,do you solve it?

I do not .
but  I delete "taskService.complete(task.getId())".
The work flow is ok.