Package org.activiti.engine.task

Examples of org.activiti.engine.task.TaskQuery.list()


   assertEquals(1, tasks.size());
   assertEquals("Task 0", tasks.get(0).getName());
  
   // Completing task 0 will create Task A and B
   taskService.complete(tasks.get(0).getId());
   tasks = query.list();
   assertEquals(2, tasks.size());
   assertEquals("Task A", tasks.get(0).getName());
   assertEquals("Task B", tasks.get(1).getName());
  
   // Completing task A should not trigger any new tasks
View Full Code Here


   assertEquals("Task A", tasks.get(0).getName());
   assertEquals("Task B", tasks.get(1).getName());
  
   // Completing task A should not trigger any new tasks
   taskService.complete(tasks.get(0).getId());
   tasks = query.list();
   assertEquals(1, tasks.size());
   assertEquals("Task B", tasks.get(0).getName());

   // Completing task B creates tasks B1 and B2
   taskService.complete(tasks.get(0).getId());
View Full Code Here

   assertEquals(1, tasks.size());
   assertEquals("Task B", tasks.get(0).getName());

   // Completing task B creates tasks B1 and B2
   taskService.complete(tasks.get(0).getId());
   tasks = query.list();
   assertEquals(2, tasks.size());
   assertEquals("Task B1", tasks.get(0).getName());
   assertEquals("Task B2", tasks.get(1).getName());
  
   // Completing B1 and B2 will activate both joins, and process reaches task C
View Full Code Here

   assertEquals("Task B2", tasks.get(1).getName());
  
   // Completing B1 and B2 will activate both joins, and process reaches task C
   taskService.complete(tasks.get(0).getId());
   taskService.complete(tasks.get(1).getId());
   tasks = query.list();
   assertEquals(1, tasks.size());
   assertEquals("Task C", tasks.get(0).getName());  
  }
 
  /**
 
View Full Code Here

  public void testReceyclingExecutionWithCallActivity() {
    runtimeService.startProcessInstanceByKey("parent-process");
   
    // After process start we have two tasks, one from the parent and one from the sub process
    TaskQuery query = taskService.createTaskQuery().orderByTaskName().asc();
    List<Task> tasks = query.list();
    assertEquals(2, tasks.size());
    assertEquals("Another task", tasks.get(0).getName());
    assertEquals("Some Task", tasks.get(1).getName());
   
    // we complete the task from the parent process, the root execution is receycled, the task in the sub process is still there
View Full Code Here

    assertEquals("Another task", tasks.get(0).getName());
    assertEquals("Some Task", tasks.get(1).getName());
   
    // we complete the task from the parent process, the root execution is receycled, the task in the sub process is still there
    taskService.complete(tasks.get(1).getId());
    tasks = query.list();
    assertEquals(1, tasks.size());
    assertEquals("Another task", tasks.get(0).getName());

    // we end the task in the sub process and the sub process instance end is propagated to the parent process
    taskService.complete(tasks.get(0).getId());
View Full Code Here

   
    tq = taskService.createTaskQuery().taskAssignee("kermit");
   
    assertEquals(2, tq.count());
   
    List<Task> tasks = tq.list();
   
    taskService.complete(tasks.get(0).getId());
    taskService.complete(tasks.get(1).getId());
   
    assertProcessEnded(id);
View Full Code Here

   
    // When the timer is fired (after 2 hours), two concurrent paths should be created
    Job job = managementService.createJobQuery().singleResult();
    managementService.executeJob(job.getId());
   
    List<Task> tasksAfterTimer = taskQuery.list();
    assertEquals(2, tasksAfterTimer.size());
    Task taskAfterTimer1 = tasksAfterTimer.get(0);
    Task taskAfterTimer2 = tasksAfterTimer.get(1);
    assertEquals("Task after timer 1", taskAfterTimer1.getName());
    assertEquals("Task after timer 2", taskAfterTimer2.getName());
View Full Code Here

    TaskQuery taskQuery = taskService
      .createTaskQuery()
      .processInstanceId(pi.getId())
      .orderByTaskName()
      .asc();
    List<Task> tasks = taskQuery.list();
   
    // After process start, both tasks in the subprocesses should be active
    assertEquals("Task in subprocess A", tasks.get(0).getName());
    assertEquals("Task in subprocess B", tasks.get(1).getName());
   
View Full Code Here

    assertEquals("Task in subprocess B", tasks.get(1).getName());
   
    // Completing both tasks should active the tasks outside the subprocesses
    taskService.complete(tasks.get(0).getId());
   
    tasks = taskQuery.list();
    assertEquals("Task after subprocess A", tasks.get(0).getName());
    assertEquals("Task in subprocess B", tasks.get(1).getName());

    taskService.complete(tasks.get(1).getId());
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.