AnsweredAssumed Answered

the question of API

Question asked by yhxjldx on Mar 24, 2012
Latest reply on Mar 30, 2012 by yhxjldx
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 ?

Outcomes