06-19-2015 04:57 AM
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());
06-20-2015 06:21 PM
06-22-2015 09:44 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.