I am trying to query for completed tasks and I can't find a way to do it through the TaskQueryService and I do not know the database tables well enough to use native query. Can anyone lend a hand as to where the task "status" is kept and how to query for this? I am using Activiti 5.7.
Also, is there a way to do an exclusion query in the TaskQueryService? For example, how do I query for all tasks with a name NOT equal to "Review Task".
As soon as a Task is completed, it's removed from the task-table (the RU in the ACT_RU_TASK table name, stands for runtime). If your history-level is configured correctly (see user guide), the task will be present in the ACT_HI_TASKINST table, query able using historyService.createHistoricTaskQuery().