cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti processEngine: get task completed and not complted by a given user

david12
Champ in-the-making
Champ in-the-making

I start learning Activiti. I would like to get a  list of completed tasks for a given user and another list of tasks not completed yet by a given user  with the processEngine (not the REST API).

Thank you.

David

1 ACCEPTED ANSWER

daisuke-yoshimo
Star Collaborator
Star Collaborator

HistoricTaskInstanceQuery matches your case.

HistoryService (Activiti - Engine 5.22.0 API) 

historyService.createHistoricTaskInstanceQuery().finished().taskAssignee('userCd')

historyService.createHistoricTaskInstanceQuery().unfinished().taskAssignee('userCd')

View answer in original post

2 REPLIES 2

daisuke-yoshimo
Star Collaborator
Star Collaborator

HistoricTaskInstanceQuery matches your case.

HistoryService (Activiti - Engine 5.22.0 API) 

historyService.createHistoricTaskInstanceQuery().finished().taskAssignee('userCd')

historyService.createHistoricTaskInstanceQuery().unfinished().taskAssignee('userCd')

david12
Champ in-the-making
Champ in-the-making

Thank you daisuke-yoshimoto.