1 of 1 people found this helpful
What's mean 'next task'?
If you mean the task of the next step, I am afraid to say there is no way to do that, because util execution arrival the activity, the related task could be created and be queried.
If you mean the history task, you could use historyService.createHistoryTaskQuery() to do query.
Effectivelly, you are totally right !
My fisrt idea was to show terminated tasks (easy to get with a modified historyTask, because ther is no taskname in historyTask), current tasks and future tasks to do, but my first idea was too simplist...
So I changed my mind and get only the current opened tasks, and that enough !
If I need more I think it is more complicated using the list of activities of a processDefinition and crossing it to tasks from the current instance...