use of pro.taskana.impl.ObjectReference in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testFindObjectReferenceByType.
@Test
public void testFindObjectReferenceByType() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<ObjectReference> objectReferenceList = taskQuery.createObjectReferenceQuery().typeIn("Type2", "Type3").list();
assertNotNull(objectReferenceList);
assertEquals(2, objectReferenceList.size());
}
use of pro.taskana.impl.ObjectReference in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testFindObjectReferenceByCompany.
@Test
public void testFindObjectReferenceByCompany() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<ObjectReference> objectReferenceList = taskQuery.createObjectReferenceQuery().companyIn("Company1", "Company2").list();
assertNotNull(objectReferenceList);
assertEquals(2, objectReferenceList.size());
}
use of pro.taskana.impl.ObjectReference in project taskana by Taskana.
the class QueryObjectReferenceAccTest method testFindObjectReferenceByValue.
@Test
public void testFindObjectReferenceByValue() throws SQLException, ClassificationNotFoundException, NotAuthorizedException, InvalidArgumentException {
TaskQuery taskQuery = taskanaEngine.getTaskService().createTaskQuery();
List<ObjectReference> objectReferenceList = taskQuery.createObjectReferenceQuery().valueIn("Value1", "Value3").list();
assertNotNull(objectReferenceList);
assertEquals(2, objectReferenceList.size());
}
use of pro.taskana.impl.ObjectReference in project taskana by Taskana.
the class ExampleBootstrap method test.
@PostConstruct
public void test() throws TaskNotFoundException, NotAuthorizedException, WorkbasketNotFoundException, ClassificationNotFoundException, InvalidStateException, InvalidOwnerException, InvalidWorkbasketException, TaskAlreadyExistException, InvalidArgumentException {
System.out.println("---------------------------> Start App");
Task task = taskService.newTask("1");
task.setName("Spring example task");
ObjectReference objRef = new ObjectReference();
objRef.setCompany("aCompany");
objRef.setSystem("aSystem");
objRef.setSystemInstance("anInstance");
objRef.setType("aType");
objRef.setValue("aValue");
task.setPrimaryObjRef(objRef);
task = taskService.createTask(task);
System.out.println("---------------------------> Task started: " + task.getId());
taskService.claim(task.getId());
System.out.println("---------------------------> Task claimed: " + taskService.getTask(task.getId()).getOwner());
taskService.completeTask(task.getId(), true);
System.out.println("---------------------------> Task completed");
}
use of pro.taskana.impl.ObjectReference in project taskana by Taskana.
the class AbstractAccTest method createObjectReference.
protected ObjectReference createObjectReference(String company, String system, String systemInstance, String type, String value) {
ObjectReference objectReference = new ObjectReference();
objectReference.setCompany(company);
objectReference.setSystem(system);
objectReference.setSystemInstance(systemInstance);
objectReference.setType(type);
objectReference.setValue(value);
return objectReference;
}
Aggregations