06-08-2012 07:10 AM
@Deployment(resources = { "workflow/TestProcess2.bpmn20.xml" }) @Test public void should_complete_process() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(RESTART, new HashMap<String, Object>()); Assert.assertNotNull(processInstance); List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list(); for (Task task : list) { taskService.complete(task.getId()); } List<ProcessInstance> list1 = runtimeService.createProcessInstanceQuery().processDefinitionKey(RESTART).list(); Assert.assertTrue(list1.isEmpty()); }
06-08-2012 03:39 PM
List<Task> list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
for (Task task : list) {
taskService.complete(task.getId());
}
06-11-2012 03:38 AM
Assert.assertEquals(1,list.size());
list = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list();
Assert.assertTrue(list.isEmpty());
after the for loop.06-12-2012 10:14 AM
06-12-2012 01:16 PM
06-18-2012 06:30 AM
06-18-2012 07:42 AM
06-18-2012 09:20 AM
06-19-2012 05:03 AM
06-20-2012 03:48 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.