Package org.activiti.engine

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


    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("Task in between", task.getName());
    taskService.complete(task.getId());
   
    // There should be two task open now for gonzo
    assertEquals(2, taskService.createTaskQuery().taskAssignee("gonzo").count());
  }
 
  @Test
  public void testUserTasksInChoice() throws Exception {
    TaskService taskService = activitiRule.getTaskService();
View Full Code Here


    // Validate
    Map<String, Object> varMap = new HashMap<String, Object>();
    varMap.put("test", "hello");
    String definitionKey = convertAndDeploy(workflowDefinition);
    ProcessInstance instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
View Full Code Here

    Map<String, Object> varMap = new HashMap<String, Object>();
    varMap.put("test", "hello");
    String definitionKey = convertAndDeploy(workflowDefinition);
    ProcessInstance instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
   
View Full Code Here

    String definitionKey = convertAndDeploy(workflowDefinition);
    ProcessInstance instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("second task", task.getName());
View Full Code Here

   
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("first task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("second task", task.getName());
    taskService.complete(task.getId());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
View Full Code Here

   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("second 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());
   
View Full Code Here

    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
   
    varMap = new HashMap<String, Object>();
    varMap.put("test", "world");
    instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
View Full Code Here

   
    varMap = new HashMap<String, Object>();
    varMap.put("test", "world");
    instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
   
View Full Code Here

    varMap.put("test", "world");
    instance = activitiRule.getRuntimeService().startProcessInstanceByKey(definitionKey, varMap);
    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());
   
    task = taskService.createTaskQuery().singleResult();
    assertEquals("last task", task.getName());
View Full Code Here

   
    task = taskService.createTaskQuery().singleResult();
    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());
  }
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.