Package org.activiti.engine

Examples of org.activiti.engine.TaskService.complete()


    assertEquals("gonzo task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
    taskService.complete(task.getId());
   
    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
  }
 
  @Test
View Full Code Here


    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(0, taskService.createTaskQuery().taskAssignee("gonzo").count());
   
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("first task", task.getName());
    taskService.complete(task.getId());
   
    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
   
    varMap = new HashMap<String, Object>();
    varMap.put("test", "world");
View Full Code Here

    assertEquals(0, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("gonzo task", task.getName());
    taskService.complete(task.getId());
   
    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
  }
 
  @Test
View Full Code Here

    activitiRule.getIdentityService().setAuthenticatedUserId("null");
   
    // Complete first task
    TaskService taskService = activitiRule.getTaskService();
    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    taskService.complete(taskService.createTaskQuery().singleResult().getId());
   
    // Second task should be done by initiator of workflow
    assertEquals(1, taskService.createTaskQuery().taskAssignee("MrPink").count());
    assertEquals(0, taskService.createTaskQuery().taskAssignee("kermit").count());
  }
View Full Code Here

    TaskService taskService = activitiRule.getTaskService();
    assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("management").count());
    assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("sales").count());
    assertEquals(1, taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("management")).count());
    assertEquals(1, taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("management", "sales")).count());
    taskService.complete(taskService.createTaskQuery().singleResult().getId());
   
    // Second task is only done by sales
    assertEquals(0, taskService.createTaskQuery().taskCandidateGroup("management").count());
    assertEquals(1, taskService.createTaskQuery().taskCandidateGroup("sales").count());
    assertEquals(0, taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("management")).count());
View Full Code Here

    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    Task task = taskService.createTaskQuery().singleResult();
   
    // Completing the task using the predefined process variable (normally done through the form)
    TaskService taskService = activitiRule.getTaskService();
    taskService.complete(task.getId(), CollectionUtil.singletonMap(FeedbackStepDefinitionConverter.VARIABLE_FEEDBACK_PROVIDERS, Arrays.asList("gonzo", "fozzie")));
   
    // Three tasks should be available now
    assertEquals(3, taskService.createTaskQuery().count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
View Full Code Here

     TaskService taskService = processEngine.getTaskService();
     Task task = taskService
       .createTaskQuery()
       .list()
       .get(0);
     taskService.complete(task.getId());
    
     // Check if the process instance has really ended.  This means that the process definition has
     // re-loaded into the process definition cache
     processInstance = processEngine
       .getRuntimeService()
View Full Code Here

    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
   
    TaskService taskService = activitiRule.getTaskService();
    List<Task> list = taskService.createTaskQuery().list();
   
    taskService.complete(list.get(0).getId());
    taskService.complete(list.get(1).getId());
    taskService.complete(list.get(2).getId());
  }
}
View Full Code Here

   
    TaskService taskService = activitiRule.getTaskService();
    List<Task> list = taskService.createTaskQuery().list();
   
    taskService.complete(list.get(0).getId());
    taskService.complete(list.get(1).getId());
    taskService.complete(list.get(2).getId());
  }
}
View Full Code Here

    TaskService taskService = activitiRule.getTaskService();
    List<Task> list = taskService.createTaskQuery().list();
   
    taskService.complete(list.get(0).getId());
    taskService.complete(list.get(1).getId());
    taskService.complete(list.get(2).getId());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.