cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the previous task name

sai576
Champ on-the-rise
Champ on-the-rise
Actually i want to use the previous task name in current task so how to get the previous task name in current task in activiti?
Thanks adv…
eg: TASK1==>TASK2==>TASK3

i want to use the task1 name in task2 and task2 name in task1.
2 REPLIES 2

caoyongviper
Champ in-the-making
Champ in-the-making
Maybe you can retrive task historic instances order by date. Then you can retrive the previous task from historic task instances collection.

frederikherema1
Star Contributor
Star Contributor
Or run through the BPMNModel manually to see what tasks are present in the model. This works good for future and past tasks, keeping in mind that any "gateway" logic you'll have to future out yourself, as the BPMNMOdel is an actual representation of the process-definition, and not how a certain process has gone through the steps. To find out what exact steps have been taken in the PAST, use the suggestion above by @caoyongviper.