AnsweredAssumed Answered

Can't get historicTaskInstance By unfinished filter

Question asked by smartxiaofish on Jun 19, 2015
Latest reply on Jun 23, 2015 by smartxiaofish
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");
      // delete it
      taskSrv.deleteTask(task.getId(), "ownerDelete");
      // check deletion by assignee
      List<HistoricTaskInstance> hisTaskListByAssignee = historySrv.createHistoricTaskInstanceQuery()
      assertEquals(1, hisTaskListByAssignee.size()); // passed
      assertEquals("ownerDelete", hisTaskListByAssignee.get(0).getDeleteReason());
      // check deletion by owner
      List<HistoricTaskInstance> hisTaskListByOwner = historySrv.createHistoricTaskInstanceQuery()
      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.