cancel
Showing results for 
Search instead for 
Did you mean: 

Get the next tasks

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

I have a simple question : is it possible via the WorkflowService (or another way) to get the next tasks (WorkflowTask) from a given task.

I can retrieve the transitions from a given task like this :
WorkflowTransition[] transitions = task.getPath().getNode().getTransitions();


I would like to do the same for the tasks targeted by this transitions.
I assume it is not possible as these tasks are not instanciated yet, but I would like to be sure of this.

Can anyone confirm that ?
Thanks !
1 REPLY 1

niketapatel
Star Contributor
Star Contributor
Hi Tony,

Yes I believe its not possible to get next Task as its not yet instantiated.

If current task is ended/completed then you can get next task.

Suppose, I have startTask.

workflowService.endTask(startTask.id, null); // end start task
workflowService.getTasksForWorkflowPath(startTask.getPath().getId()); //It will give you next task list
//do logical operation before user access this task from UI