Examples of startProcessByKey()


Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  public void test() throws Exception {

    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    // start the process
    businessProcess.startProcessByKey("businessProcessBeanTest").getId();

    // ensure that the process is started:
    assertNotNull(processEngine.getRuntimeService().createProcessInstanceQuery().singleResult());

    // ensure that there is a single task waiting
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  @Deployment
  public void testProcessWithoutWaitState() {
    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    // start the process
    businessProcess.startProcessByKey("businessProcessBeanTest").getId();

    // assert that the process is ended:
    assertNull(processEngine.getRuntimeService().createProcessInstanceQuery().singleResult());
  }
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

    assertNull(getBeanInstance(ProcessInstance.class));
    assertNull(getBeanInstance("processInstanceId"));
    assertNull(getBeanInstance(Execution.class));
    assertNull(getBeanInstance("executionId"));

    String pid = businessProcess.startProcessByKey("businessProcessBeanTest").getId();

    // assert that now we can resolve the ProcessInstance-bean
    assertEquals(pid, getBeanInstance(ProcessInstance.class).getId());
    assertEquals(pid, getBeanInstance("processInstanceId"));
    assertEquals(pid, getBeanInstance(Execution.class).getId());
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

    assertNull(getBeanInstance(Task.class));
    assertNull(getBeanInstance("taskId"));
   

    businessProcess.startProcessByKey("businessProcessBeanTest");
    String taskId = taskService.createTaskQuery().singleResult().getId();
   
    businessProcess.startTask(taskId);

    // assert that now we can resolve the Task-bean
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  public void test() throws Exception {

    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    // start the process
    businessProcess.startProcessByKey("businessProcessBeanTest").getId();

    // ensure that the process is started:
    assertNotNull(processEngine.getRuntimeService().createProcessInstanceQuery().singleResult());

    // ensure that there is a single task waiting
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

    assertNull(getBeanInstance(ProcessInstance.class));
    assertNull(getBeanInstance("processInstanceId"));
    assertNull(getBeanInstance(Execution.class));
    assertNull(getBeanInstance("executionId"));

    String pid = businessProcess.startProcessByKey("businessProcessBeanTest").getId();

    // assert that now we can resolve the ProcessInstance-bean
    assertEquals(pid, getBeanInstance(ProcessInstance.class).getId());
    assertEquals(pid, getBeanInstance("processInstanceId"));
    assertEquals(pid, getBeanInstance(Execution.class).getId());
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

    assertNull(getBeanInstance(Task.class));
    assertNull(getBeanInstance("taskId"));
   

    businessProcess.startProcessByKey("businessProcessBeanTest");
    String taskId = taskService.createTaskQuery().singleResult().getId();
   
    businessProcess.startTask(taskId);

    // assert that now we can resolve the Task-bean
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  @Test
  @Deployment
  public void testResolution() throws Exception {
    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    businessProcess.startProcessByKey("testResolution").getId();

    assertNotNull(getBeanInstance(CreditCard.class));   
  }

  @Test
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  @Deployment(resources = "org/activiti/cdi/test/api/annotation/CompleteTaskTest.bpmn20.xml")
  public void testCompleteTask() {

    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);

    businessProcess.startProcessByKey("keyOfTheProcess");

    Task task = taskService.createTaskQuery().singleResult();
   
    // associate current unit of work with the task:
    businessProcess.startTask(task.getId());
View Full Code Here

Examples of org.activiti.cdi.BusinessProcess.startProcessByKey()

  @Test
  @Deployment
  public void testTaskIdInjectable() {
    BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);
    businessProcess.startProcessByKey("keyOfTheProcess")
   
    businessProcess.startTask(taskService.createTaskQuery().singleResult().getId());  
   
    // assert that now the 'taskId'-bean can be looked up
    assertNotNull(getBeanInstance("taskId"));
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.