Package org.activiti.engine

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


    public Page findDelegatedTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

        long count = taskService.createTaskQuery().taskOwner(userId)
                .taskDelegationState(DelegationState.PENDING).count();
        List<Task> tasks = taskService.createTaskQuery().taskOwner(userId)
                .taskDelegationState(DelegationState.PENDING)
                .listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);
View Full Code Here


    /**
     * 任务.
     */
    public Page findTasks(Page page) {
        TaskService taskService = processEngine.getTaskService();
        long count = taskService.createTaskQuery().count();
        List<Task> tasks = taskService.createTaskQuery().listPage(
                (int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

View Full Code Here

     * 任务.
     */
    public Page findTasks(Page page) {
        TaskService taskService = processEngine.getTaskService();
        long count = taskService.createTaskQuery().count();
        List<Task> tasks = taskService.createTaskQuery().listPage(
                (int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
View Full Code Here

        FormTemplateManager formTemplateManager = getFormTemplateManager();
        KeyValue keyValue = getKeyValue();
        String taskId = getParameter(OPERATION_TASK_ID);

        TaskService taskService = processEngine.getTaskService();
        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();

        // 处理抄送任务
        if ("copy".equals(task.getCategory())) {
            new DeleteTaskWithCommentCmd(taskId, "已阅").execute(commandContext);
View Full Code Here

    @RequestMapping("form-viewTaskForm")
    public String viewTaskForm(@RequestParam("taskId") String taskId,
            Model model, RedirectAttributes redirectAttributes)
            throws Exception {
        TaskService taskService = processEngine.getTaskService();
        Task task = taskService.createTaskQuery().taskId(taskId).singleResult();

        if (task == null) {
            messageHelper.addFlashMessage(redirectAttributes, "任务不存在");

            return "redirect:/bpm/workspace-listPersonalTasks.do";
View Full Code Here

    List<HistoricDetail> list = historyService.createHistoricDetailQuery().formProperties().list();
    assertEquals(1, list.size());
   
    // 获取第一个节点
    TaskService taskService = activitiRule.getTaskService();
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("First Step", task.getName());
   
    TaskFormData taskFormData = formService.getTaskFormData(task.getId());
    assertNotNull(taskFormData);
    assertNull(taskFormData.getFormKey());
View Full Code Here

    formProperties = new HashMap<String, String>();
    formProperties.put("setInFirstStep", "01/12/2012");
    formService.submitTaskFormData(task.getId(), formProperties);
   
    // 获取第二个节点
    task = taskService.createTaskQuery().taskName("Second Step").singleResult();
    assertNotNull(task);
    taskFormData = formService.getTaskFormData(task.getId());
    assertNotNull(taskFormData);
    List<FormProperty> formProperties2 = taskFormData.getFormProperties();
    assertNotNull(formProperties2);
View Full Code Here

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

    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

      assertNull(subProcessInstance.getBusinessKey());
    }

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