Package org.camunda.bpm.engine.task

Examples of org.camunda.bpm.engine.task.TaskQuery.list()


    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


    managementService.executeJob(job.getId());

    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(3, taskQuery.count());

    List<Task> tasks = taskQuery.list();

    for (Task task : tasks) {
      taskService.complete(task.getId());
    }
View Full Code Here

    managementService.executeJob(job.getId());

    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(10, taskQuery.count());

    List<Task> tasks = taskQuery.list();

    for (Task task : tasks) {
      taskService.complete(task.getId());
    }
View Full Code Here

    managementService.executeJob(job.getId());

    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(2, taskQuery.count());

    List<Task> tasks = taskQuery.list();

    for (Task task : tasks) {
      taskService.complete(task.getId());
    }
View Full Code Here

    managementService.executeJob(job.getId());

    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(2, taskQuery.count());

    List<Task> tasks = taskQuery.list();

    for (Task task : tasks) {
      taskService.complete(task.getId());
    }
View Full Code Here

    managementService.executeJob(job.getId());

    TaskQuery taskQuery = taskService.createTaskQuery();
    assertEquals(2, taskQuery.count());

    List<Task> tasks = taskQuery.list();

    for (Task task : tasks) {
      taskService.complete(task.getId());
    }
View Full Code Here

  public void testNestedForkJoin() {
   String pid = runtimeService.startProcessInstanceByKey("nestedForkJoin").getId();

   // After process startm, only task 0 should be active
   TaskQuery query = taskService.createTaskQuery().orderByTaskName().asc();
   List<Task> tasks = query.list();
   assertEquals(1, tasks.size());
   assertEquals("Task 0", tasks.get(0).getName());
   assertEquals(1, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);

   // Completing task 0 will create Task A and B
View Full Code Here

   assertEquals("Task 0", tasks.get(0).getName());
   assertEquals(1, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);

   // 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());
   assertEquals(2, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);
View Full Code Here

   assertEquals("Task B", tasks.get(1).getName());
   assertEquals(2, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);

   // 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());
   assertEquals(2, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);

   // Completing task B creates tasks B1 and B2
View Full Code Here

   assertEquals("Task B", tasks.get(0).getName());
   assertEquals(2, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);

   // 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());
   assertEquals(3, runtimeService.getActivityInstance(pid).getChildActivityInstances().length);
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.