cancel
Showing results for 
Search instead for 
Did you mean: 

How to query all task of a user(userId and candidate user and group) including historic?

bbbxixixixi
Champ in-the-making
Champ in-the-making
I find that we can do this when the task is not finished by calling taskService.createTaskQuery().taskCandidateOrAssigned, however, there is no such method for running and historic tasks all together. I may do this by querying all running and historic respectively and manage them via java code, but I consider it is not a very good idea and it surely will comsume a lot of resources.
Could you give me some advice? Thanks.
2 REPLIES 2

vasile_dirla
Star Contributor
Star Contributor
Hi,
yes, there is a better approach "Custom SQL queries" :
http://www.jorambarrez.be/blog/2014/01/17/execute-custom-sql-in-activiti/

you could have a look in the Activiti code over this Test:

CustomMybatisXMLMapperTest.java

This will help you a lot for sure Smiley Wink

Thanks, I will try