use of pro.taskana.TaskQuery in project taskana by Taskana.
the class QueryTasksAccTest method testQueryAndCountMatch.
@WithAccessId(userName = "user_1_1", groupNames = { "group_1" })
@Test
public void testQueryAndCountMatch() {
TaskService taskService = taskanaEngine.getTaskService();
TaskQuery taskQuery = taskService.createTaskQuery();
List<TaskSummary> tasks = taskQuery.nameIn("Task99", "Task01", "Widerruf").list();
long numberOfTasks = taskQuery.nameIn("Task99", "Task01", "Widerruf").count();
Assert.assertEquals(numberOfTasks, tasks.size());
}
use of pro.taskana.TaskQuery in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testQueryObjectReferenceValuesForColumnName.
@Test
public void testQueryObjectReferenceValuesForColumnName() {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<String> columnValues = taskQuery.createObjectReferenceQuery().listValues("COMPANY", null);
assertEquals(3, columnValues.size());
columnValues = taskQuery.createObjectReferenceQuery().listValues("SYSTEM", null);
assertEquals(3, columnValues.size());
columnValues = taskQuery.createObjectReferenceQuery().systemIn("System1").listValues("SYSTEM", null);
assertEquals(1, columnValues.size());
}
use of pro.taskana.TaskQuery in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testFindObjectReferenceBySystemInstance.
@Test
public void testFindObjectReferenceBySystemInstance() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<ObjectReference> objectReferenceList = taskQuery.createObjectReferenceQuery().companyIn("Company1", "Company2").systemInstanceIn("Instance1").list();
assertNotNull(objectReferenceList);
assertEquals(1, objectReferenceList.size());
}
use of pro.taskana.TaskQuery in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testFindObjectReferenceBySystem.
@Test
public void testFindObjectReferenceBySystem() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<ObjectReference> objectReferenceList = taskQuery.createObjectReferenceQuery().companyIn("Company1", "Company2").systemIn("System2").list();
assertNotNull(objectReferenceList);
assertEquals(1, objectReferenceList.size());
}
Aggregations