use of org.activiti.cdi.BusinessProcess in project Activiti by Activiti.
the class StartProcessTest method testStartProcessByKey.
@Test
@Deployment(resources = "org/activiti/cdi/test/api/annotation/StartProcessTest.bpmn20.xml")
public void testStartProcessByKey() {
assertNull(runtimeService.createProcessInstanceQuery().singleResult());
getBeanInstance(DeclarativeProcessController.class).startProcessByKey();
BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);
assertNotNull(runtimeService.createProcessInstanceQuery().singleResult());
assertEquals("Activiti", businessProcess.getVariable("name"));
businessProcess.startTask(taskService.createTaskQuery().singleResult().getId());
businessProcess.completeTask();
}
use of org.activiti.cdi.BusinessProcess in project Activiti by Activiti.
the class BusinessProcessContextTest method testResolution.
@Test
@Deployment
public void testResolution() throws Exception {
BusinessProcess businessProcess = getBeanInstance(BusinessProcess.class);
businessProcess.startProcessByKey("testResolution").getId();
assertNotNull(getBeanInstance(CreditCard.class));
}
Aggregations