Examples of createTaskQuery()


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

    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " "
        + processInstance.getProcessDefinitionId());
   
    TaskService taskService = processEngine.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    assertNotNull(task);
   
    HashMap<String, Object> properties = new HashMap<String, Object>();
    Calendar ca = Calendar.getInstance();
    ca.add(Calendar.SECOND, 1);
View Full Code Here

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

      assertNull(subProcessInstance.getBusinessKey());
    }

    // 验证用户列表中的用户是否都有一个待办任务
    for (String user : users) {
      long count = taskService.createTaskQuery().taskAssignee(user).count();
      assertEquals(1, count);
    }

  }
}
View Full Code Here

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

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("DefaultFlow", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
   
    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("usertask2", task.getTaskDefinitionKey());
  }
}
View Full Code Here

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

    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());

    Task singleResult = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult();
    String url = "http://labs.mop.com/apache-mirror//ant/binaries/apache-ant-1.8.3-bin.zip";
    String attachmentDescription = "ant bin package";
    taskService.createAttachment("zip", singleResult.getId(), processInstance.getId(), "apache-ant-1.8.3-bin.zip", attachmentDescription, url);
    taskService.complete(singleResult.getId());
View Full Code Here

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

    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
    assertNotNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());

    Task singleResult = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult();
    taskService.complete(singleResult.getId());
View Full Code Here

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

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process1", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
    assertNotNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());

    Task singleResult = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult();
    taskService.complete(singleResult.getId());

    assertNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
View Full Code Here

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

    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
    assertNotNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());

    Task singleResult = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult();
    taskService.complete(singleResult.getId());

    assertNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
    assertNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());
  }
View Full Code Here

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

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());

    Task singleResult = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult();
    taskService.complete(singleResult.getId());

    assertNull(taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult());
    assertNull(taskService.createTaskQuery().taskCandidateUser("kafeitu").singleResult());
  }

  @Test
  @Deployment(resources = { "diagrams/Attachment.bpmn" })
View Full Code Here

Examples of org.camunda.bpm.engine.TaskService.createTaskQuery()

    
     assertNotNull(processInstance);
    
     // Complete the task.  That will end the process instance
     TaskService taskService = processEngine.getTaskService();
     Task task = taskService
       .createTaskQuery()
       .list()
       .get(0);
     taskService.complete(task.getId());
    
View Full Code Here

Examples of org.camunda.bpm.engine.TaskService.createTaskQuery()

      .getId();
   
    // Start process instance on second engine
    String processDefinitionId = repositoryService2.createProcessDefinitionQuery().singleResult().getId();
    runtimeService2.startProcessInstanceById(processDefinitionId);
    Task task = taskService2.createTaskQuery().singleResult();
    assertEquals("original task", task.getName());
   
    // Delete the deployment on second process engine
    repositoryService2.deleteDeployment(deploymentId, true);
    assertEquals(0, repositoryService2.createDeploymentQuery().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.