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 ?