Package org.activiti.engine

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


    // get a handle on the task service
    TaskService taskService = activitiRule.getTaskService();

    // seach for a task for candidate-group 'itsupport-critical'
    Task approveCriticalIssueTask = taskService.createTaskQuery()
        .processInstanceId(processInstance.getProcessInstanceId())
        .taskCandidateGroup(itSupportGroup.getId()).singleResult();
    assertThat(approveCriticalIssueTask.getName(),
        equalTo("Approve Critical Issue"));
View Full Code Here


    runtimeService.signal(processInstance.getId());
   
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", true);
   
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId(), variables);
   
    assertEquals(0, runtimeService.createProcessInstanceQuery().list().size());
   
    List<HistoricActivityInstance> activityInstances = historyService.createHistoricActivityInstanceQuery().orderByHistoricActivityInstanceStartTime().asc().list();
View Full Code Here

    runtimeService.signal(processInstance.getId());
   
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", false);
   
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId(), variables);
   
    assertEquals(0, runtimeService.createProcessInstanceQuery().list().size());
   
    List<HistoricActivityInstance> activityInstances = historyService.createHistoricActivityInstanceQuery().orderByHistoricActivityInstanceStartTime().asc().list();
View Full Code Here

    runtimeService.signal(processInstance.getId());
   
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", true);
   
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId(), variables);
   
    assertEquals(0, runtimeService.createProcessInstanceQuery().list().size());
   
    List<HistoricActivityInstance> activityInstances = historyService.createHistoricActivityInstanceQuery().orderByHistoricActivityInstanceStartTime().asc().list();
View Full Code Here

    runtimeService.signal(processInstance.getId());
   
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("approved", false);
   
    Task task = taskService.createTaskQuery().singleResult();
    taskService.complete(task.getId(), variables);
   
    assertEquals(0, runtimeService.createProcessInstanceQuery().list().size());
   
    List<HistoricActivityInstance> activityInstances = historyService.createHistoricActivityInstanceQuery().orderByHistoricActivityInstanceStartTime().asc().list();
View Full Code Here

     * 待办任务(个人任务).
     */
    public Page findPersonalTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

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

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

        long count = taskService.createTaskQuery().taskAssignee(userId)
                .active().count();
        List<Task> tasks = taskService.createTaskQuery().taskAssignee(userId)
                .active().listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
View Full Code Here

     * 代领任务(组任务).
     */
    public Page findGroupTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

        long count = taskService.createTaskQuery().taskCandidateUser(userId)
                .active().count();
        List<Task> tasks = taskService.createTaskQuery()
                .taskCandidateUser(userId).active()
                .listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
View Full Code Here

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

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

     * 代理中的任务(代理人还未完成该任务).
     */
    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);
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.