Package org.activiti.cdi

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


    businessProcess.setVariable("key", value);
    assertEquals(value, businessProcess.getVariable("key"));

    // complete the task
    assertEquals(task.getId(), businessProcess.startTask(task.getId()).getId());
    businessProcess.completeTask();

    // assert the task is completed
    assertNull(processEngine.getTaskService().createTaskQuery().singleResult());

    // assert that the process is ended:
View Full Code Here


    businessProcess.setVariable("key", value);
    assertEquals(value, businessProcess.getVariable("key"));

    // complete the task
    assertEquals(task.getId(), businessProcess.startTask(task.getId()).getId());
    businessProcess.completeTask();

    // assert the task is completed
    assertNull(processEngine.getTaskService().createTaskQuery().singleResult());

    // assert that the process is ended:
View Full Code Here

    assertNotNull(runtimeService.createProcessInstanceQuery().singleResult());

    assertEquals("Activiti", businessProcess.getVariable("name"));
   
    businessProcess.startTask(taskService.createTaskQuery().singleResult().getId());
    businessProcess.completeTask();
  }

  @Test
  @Deployment(resources = "org/activiti/cdi/test/api/annotation/StartProcessTest.bpmn20.xml")
  public void testStartProcessByName() {
View Full Code Here

    assertNotNull(runtimeService.createProcessInstanceQuery().singleResult());

    assertEquals("Activiti", businessProcess.getVariable("name"));

    businessProcess.startTask(taskService.createTaskQuery().singleResult().getId())
    businessProcess.completeTask();
  }

}
View Full Code Here

    businessProcess.startTask(taskService.createTaskQuery().singleResult().getId());  
   
    // assert that now the 'taskId'-bean can be looked up
    assertNotNull(getBeanInstance("taskId"));
   
    businessProcess.completeTask();
  }
 
}
View Full Code Here

    businessProcess.startTask(taskService.createTaskQuery().singleResult().getId());
   
    InjectProcessVariable injectProcessVariables = getBeanInstance(InjectProcessVariable.class);
    assertEquals("testValue", injectProcessVariables.testKeyString);

    businessProcess.completeTask();
  }

}
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.