Hi~ i have some tasks completed and deleted before completed.and i tried historySrv.createHistoricTaskInstanceQuery().finshed() and unfinished().here is the test code
Task task = taskSrv.newTask();
task.setName("test execution");
task.setOwner(user1.getId());
task.setAssignee(user2.getId());
taskSrv.saveTask(task);
// delete it
taskSrv.deleteTask(task.getId(), "ownerDelete");
// check deletion by assignee
List<HistoricTaskInstance> hisTaskListByAssignee = historySrv.createHistoricTaskInstanceQuery()
.taskAssignee(user2.getId()).list();
assertEquals(1, hisTaskListByAssignee.size()); // passed
assertEquals("ownerDelete", hisTaskListByAssignee.get(0).getDeleteReason());
// check deletion by owner
List<HistoricTaskInstance> hisTaskListByOwner = historySrv.createHistoricTaskInstanceQuery()
.taskOwner(user1.getId()).unfinished().list();
assertEquals(1, hisTaskListByOwner.size()); // failed and hisTaskListByOwner.size() is 0
assertEquals("ownerDelete", hisTaskListByOwner.get(0).getDeleteReason());
it seems that finished task doesn't mean completed task.so what does finished tasks and unfinished tasks mean in historicTaskInstance ?and is there any way to get tasks completed and deleted before completed in HistoricTaskInstanceQuery?appreciate for any reply.