Package org.activiti.engine

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


    Map<String, Object> varMap = new HashMap<String, Object>();
    varMap.put("test", "hello");
    varMap.put("test2", "world");
    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


    varMap.put("test", "hello");
    varMap.put("test2", "world");
    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());
   
    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
   
View Full Code Here

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

    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
    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

    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().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());
  }
 
  @Test
  public void testGroupsForHumanStep() {
View Full Code Here

    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());
  }
 
  @Test
  public void testGroupsForHumanStep() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
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.