Package org.activiti.engine

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


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

    String taskId = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult().getId();
    taskService.addCandidateUser(taskId, "runtimeUser");

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

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

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


    String taskId = taskService.createTaskQuery().taskCandidateUser("henryyan").singleResult().getId();
    taskService.addCandidateUser(taskId, "runtimeUser");

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("runtimeUser").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

    assertNotNull(taskService.createTaskQuery().taskCandidateUser("runtimeUser").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

    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

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

    assertNotNull(taskService.createTaskQuery().taskAssignee("fg").singleResult());
  }
}
View Full Code Here

      .groupType("assignment");
   
    List<Group> groups = query.list();
    ObjectNode groupsJSON = new ObjectMapper().createObjectNode();
    for (Group group : groups) {
      long tasksInGroup = ts.createTaskQuery().taskCandidateGroup(group.getId()).count();
      groupsJSON.put(group.getName(), tasksInGroup);
    }
   
    ObjectNode summaryResponseJSON = new ObjectMapper().createObjectNode();
   
View Full Code Here

    }
   
    ObjectNode summaryResponseJSON = new ObjectMapper().createObjectNode();
   
    ObjectNode totalAssignedJSON = new ObjectMapper().createObjectNode();
    totalAssignedJSON.put("total", ts.createTaskQuery().taskAssignee(user).count());
    summaryResponseJSON.put("assigned", totalAssignedJSON);
   
    ObjectNode totalUnassignedJSON = new ObjectMapper().createObjectNode();
    totalUnassignedJSON.put("total", ts.createTaskQuery().taskCandidateUser(user).count());
    totalUnassignedJSON.put("groups", groupsJSON);
View Full Code Here

    ObjectNode totalAssignedJSON = new ObjectMapper().createObjectNode();
    totalAssignedJSON.put("total", ts.createTaskQuery().taskAssignee(user).count());
    summaryResponseJSON.put("assigned", totalAssignedJSON);
   
    ObjectNode totalUnassignedJSON = new ObjectMapper().createObjectNode();
    totalUnassignedJSON.put("total", ts.createTaskQuery().taskCandidateUser(user).count());
    totalUnassignedJSON.put("groups", groupsJSON);
    summaryResponseJSON.put("unassigned", totalUnassignedJSON);
   
    return summaryResponseJSON;
  }
View Full Code Here

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

    TaskQuery taskAssignee = taskService.createTaskQuery().taskAssignee("henryyan");
    System.out.println(ToStringBuilder.reflectionToString(taskAssignee));
  }
}
View Full Code Here

    variableMap.put("assigneeList", Arrays.asList("user1", "user2", "user3"));
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("MultiInstanceActivitiAttrs", variableMap);
    assertNotNull(processInstance.getId());
    System.out.println("id " + processInstance.getId() + " " + processInstance.getProcessDefinitionId());
    TaskService taskService = activitiRule.getTaskService();
    long count = taskService.createTaskQuery().count();
    assertEquals(count, 3);
  }
}
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.