Package org.activiti.engine

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


    simRun.step();

    // userTask was completed - replay process was finished
    assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
    assertEquals(0, taskService.createTaskQuery().taskDefinitionKey("userTask").count());
    HistoricVariableInstance variableInstance = historyService.createHistoricVariableInstanceQuery()
        .processInstanceId(replayProcessInstance.getId())
        .variableName(TASK_TEST_VARIABLE)
        .singleResult();
    assertNotNull(variableInstance);
View Full Code Here


    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put(TEST_VARIABLE, TEST_VALUE);
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(USERTASK_PROCESS, BUSINESS_KEY, variables);

    Task task = taskService.createTaskQuery().taskDefinitionKey("userTask").singleResult();
    TimeUnit.MILLISECONDS.sleep(50);
    taskService.complete(task.getId());

    final SimulationDebugger simRun = new ReplaySimulationRun(processEngine, getReplayHandlers(processInstance.getId()));
View Full Code Here

    simRun.init(new NoExecutionVariableScope());

    // original process is finished - there should not be any running process instance/task
    assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
    assertEquals(0, taskService.createTaskQuery().taskDefinitionKey("userTask").count());

    simRun.step();

    // replay process was started
    assertEquals(1, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
View Full Code Here

    simRun.step();

    // replay process was started
    assertEquals(1, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
    // there should be one task
    assertEquals(1, taskService.createTaskQuery().taskDefinitionKey("userTask").count());

    simRun.step();

    // userTask was completed - replay process was finished
    assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
View Full Code Here

    simRun.step();

    // userTask was completed - replay process was finished
    assertEquals(0, runtimeService.createProcessInstanceQuery().processDefinitionKey(USERTASK_PROCESS).count());
    assertEquals(0, taskService.createTaskQuery().taskDefinitionKey("userTask").count());

    simRun.close();
    processEngine.close();
    ProcessEngines.destroy();
  }
View Full Code Here

        .endList()
      .endParallel();
   
    // Validate
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("mispiggy").count());
   
    // Complete tasks
    for (Task task : taskService.createTaskQuery().list()) {
View Full Code Here

      .endParallel();
   
    // Validate
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("mispiggy").count());
   
    // Complete tasks
    for (Task task : taskService.createTaskQuery().list()) {
      activitiRule.getTaskService().complete(task.getId());
View Full Code Here

   
    // Validate
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("mispiggy").count());
   
    // Complete tasks
    for (Task task : taskService.createTaskQuery().list()) {
      activitiRule.getTaskService().complete(task.getId());
    }
View Full Code Here

    assertEquals(1, taskService.createTaskQuery().taskAssignee("kermit").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("gonzo").count());
    assertEquals(1, taskService.createTaskQuery().taskAssignee("mispiggy").count());
   
    // Complete tasks
    for (Task task : taskService.createTaskQuery().list()) {
      activitiRule.getTaskService().complete(task.getId());
    }
   
    // In between task should be active
    Task task = taskService.createTaskQuery().singleResult();
View Full Code Here

    for (Task task : taskService.createTaskQuery().list()) {
      activitiRule.getTaskService().complete(task.getId());
    }
   
    // In between task should be active
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("Task in between", task.getName());
    taskService.complete(task.getId());
   
    // There should be two task open now for gonzo
    assertEquals(2, taskService.createTaskQuery().taskAssignee("gonzo").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.