cancel
Showing results for 
Search instead for 
Did you mean: 

Having trouble getting task info in Java Delegate

klanders
Champ in-the-making
Champ in-the-making
I have a user task with a boundary timer. When the timer fires, the process goes to a service task, which calls a java delegate class.
In the java delegate class, I need access to the task name and task id for the user task (the one with the boundary timer). I must be missing something, but I cannot find a way to get this information using the DelegateExecution in the execute() method.

Seems like this should be pretty simple to do, but I'm new to Activiti and need some guidance. What's the easiest way to do this? Is there a way to get the DelegateTask for that user task?
3 REPLIES 3

trademak
Star Contributor
Star Contributor
You can look it up in the history api of Activiti. From there you can retrieve all the activities that have been executed.

Best regards,

klanders
Champ in-the-making
Champ in-the-making
Thank you. This was very helpful.
I actually decided to use TaskQuery, but it was your suggestion that showed my the way.

ssun
Champ on-the-rise
Champ on-the-rise
I feel something simple like pass variables to next task is missing from Activiti.
You can set process instance variable but that impacts everyone and conflicts when you have parallel executions.