Package org.camunda.bpm.engine.task

Examples of org.camunda.bpm.engine.task.Task


   
    assertEquals(0, runtimeService.createEventSubscriptionQuery().count());   
    assertEquals(1, runtimeService.createProcessInstanceQuery().count());   
    assertEquals(0, managementService.createJobQuery().count());
   
    Task task = taskService.createTaskQuery()
      .taskName("afterSignal")
      .singleResult();
   
    assertNotNull(task);
   
    taskService.complete(task.getId());
      
  }
View Full Code Here


    assertEquals("Inner subprocess task 2", tasks.get(1).getName());

    Job timer = managementService.createJobQuery().timers().singleResult();
    managementService.executeJob(timer.getId());

    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("task outside subprocess", task.getName());
  }
View Full Code Here

     
      assertEquals(0, runtimeService.createEventSubscriptionQuery().count());   
      assertEquals(1, runtimeService.createProcessInstanceQuery().count());   
      assertEquals(0, managementService.createJobQuery().count());
     
      Task task = taskService.createTaskQuery()
        .taskName("afterTimer")
        .singleResult();
     
      assertNotNull(task);
     
      taskService.complete(task.getId());
    }finally{
      ClockUtil.setCurrentTime(new Date());
    }
  }
View Full Code Here

     
      assertEquals(0, runtimeService.createEventSubscriptionQuery().count());   
      assertEquals(1, runtimeService.createProcessInstanceQuery().count());   
      assertEquals(0, managementService.createJobQuery().count());
     
      Task task = taskService.createTaskQuery()
        .taskName("afterMessage")
        .singleResult();
     
      assertNotNull(task);
     
      taskService.complete(task.getId());
    }finally{
      ClockUtil.setCurrentTime(new Date());
    }
  }
View Full Code Here

    runtimeService.signal(serviceTask.getId());

    assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
    assertTrue((Boolean) runtimeService.getVariable(pi, "signaled"));

    Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
    assertNotNull(userTask);
    assertEquals("userTaskException", userTask.getTaskDefinitionKey());

    taskService.complete(userTask.getId());
  }
View Full Code Here

    runtimeService.signal(serviceTask.getId());

    assertTrue((Boolean) runtimeService.getVariable(pi, "executed"));
    assertTrue((Boolean) runtimeService.getVariable(pi, "signaled"));

    Task userTask = taskService.createTaskQuery().processInstanceId(pi).singleResult();
    assertNotNull(userTask);
    assertEquals("userTaskError", userTask.getTaskDefinitionKey());

    taskService.complete(userTask.getId());
  }
View Full Code Here

  private void assertThatErrorHasBeenCaught(String procId) {
    // The process will throw an error event,
    // which is caught and escalated by a User Task
    assertEquals("No tasks found in task list.", 1, taskService.createTaskQuery().count());
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("Escalated Task", task.getName());
   
    // Completing the Task will end the process instance
    taskService.complete(task.getId());
    assertProcessEnded(procId);
  }
View Full Code Here

  @Deployment
  public void testGetFormFieldBasicProperties() {

    runtimeService.startProcessInstanceByKey("FormDataTest.testGetFormFieldBasicProperties");

    Task task = taskService.createTaskQuery().singleResult();
    TaskFormData taskFormData = formService.getTaskFormData(task.getId());

    // validate properties:
    List<FormField> formFields = taskFormData.getFormFields();

    // validate field 1
View Full Code Here

    returnedFilter = filterService.getFilter(filter.getId());
    assertNotNull(returnedFilter);

    // create test Task
    Task task = taskService.newTask("test");
    taskService.saveTask(task);

    Task result = filterService.singleResult(filter.getId());
    assertNotNull(result);
    assertEquals(task.getId(), result.getId());

    List<Task> resultList = filterService.list(filter.getId());
    assertNotNull(resultList);
    assertEquals(1, resultList.size());
    assertEquals(task.getId(), resultList.get(0).getId());
View Full Code Here

  @Deployment
  public void testGetFormFieldBuiltInTypes() {

    runtimeService.startProcessInstanceByKey("FormDataTest.testGetFormFieldBuiltInTypes");

    Task task = taskService.createTaskQuery().singleResult();

    TaskFormData taskFormData = formService.getTaskFormData(task.getId());

    // validate properties:
    List<FormField> formFields = taskFormData.getFormFields();

    // validate string field
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.task.Task

Copyright © 2018 www.massapicom. 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.