use of org.activiti.engine.runtime.JobQuery in project Activiti by Activiti.
the class JobQueryTest method testQueryByExecutionId.
public void testQueryByExecutionId() {
Job job = managementService.createJobQuery().processInstanceId(processInstanceIdOne).singleResult();
JobQuery query = managementService.createJobQuery().executionId(job.getExecutionId());
assertEquals(query.singleResult().getId(), job.getId());
verifyQueryResults(query, 1);
}
use of org.activiti.engine.runtime.JobQuery in project Activiti by Activiti.
the class JobQueryTest method testQueryByOnlyMessages.
public void testQueryByOnlyMessages() {
JobQuery query = managementService.createJobQuery().messages();
verifyQueryResults(query, 1);
}
use of org.activiti.engine.runtime.JobQuery in project Activiti by Activiti.
the class JobQueryTest method testQueryByOnlyTimers.
public void testQueryByOnlyTimers() {
JobQuery query = managementService.createJobQuery().timers();
verifyQueryResults(query, 3);
}
use of org.activiti.engine.runtime.JobQuery in project Activiti by Activiti.
the class JobQueryTest method testQueryByInvalidExecutionId.
public void testQueryByInvalidExecutionId() {
JobQuery query = managementService.createJobQuery().executionId("invalid");
verifyQueryResults(query, 0);
try {
managementService.createJobQuery().executionId(null).list();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.runtime.JobQuery in project Activiti by Activiti.
the class JobQueryTest method testQueryByNoCriteria.
public void testQueryByNoCriteria() {
JobQuery query = managementService.createJobQuery();
verifyQueryResults(query, 4);
}
Aggregations