use of org.jbpm.kie.services.test.objects.TestUserGroupCallbackImpl in project jbpm by kiegroup.
the class RuntimeDataServiceImplTaskLookupTest method asssertProcessInstance.
private void asssertProcessInstance() {
assertTrue(((RuntimeDataServiceImpl) runtimeDataService).getUserGroupCallback() instanceof TestUserGroupCallbackImpl);
Collection<ProcessInstanceDesc> instances = runtimeDataService.getProcessInstances(new QueryContext());
assertNotNull(instances);
assertEquals(0, instances.size());
processInstanceId = processService.startProcess(deploymentUnit.getIdentifier(), "UserTask");
assertNotNull(processInstanceId);
instances = runtimeDataService.getProcessInstancesByProcessDefinition("UserTask", new QueryContext());
assertNotNull(instances);
assertEquals(1, instances.size());
ProcessInstanceDesc instance = instances.iterator().next();
assertEquals(1, (int) instance.getState());
assertEquals("UserTask", instance.getProcessId());
}
Aggregations