use of org.camunda.bpm.engine.management.JobDefinitionQuery in project camunda-bpm-platform by camunda.
the class JobDefinitionQueryTest method testQueryByInvalidDefinitionKey.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn" })
public void testQueryByInvalidDefinitionKey() {
JobDefinitionQuery query = managementService.createJobDefinitionQuery().processDefinitionKey("invalid");
verifyQueryResults(query, 0);
try {
managementService.createJobDefinitionQuery().processDefinitionKey(null);
fail("A ProcessEngineExcpetion was expected.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.management.JobDefinitionQuery in project camunda-bpm-platform by camunda.
the class JobDefinitionQueryTest method testQueryByInvalidJobConfiguration.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn" })
public void testQueryByInvalidJobConfiguration() {
JobDefinitionQuery query = managementService.createJobDefinitionQuery().jobConfiguration("invalid");
verifyQueryResults(query, 0);
try {
managementService.createJobDefinitionQuery().jobConfiguration(null);
fail("A ProcessEngineExcpetion was expected.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.management.JobDefinitionQuery in project camunda-bpm-platform by camunda.
the class JobDefinitionQueryTest method testQueryByInvalidActivityId.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn" })
public void testQueryByInvalidActivityId() {
JobDefinitionQuery query = managementService.createJobDefinitionQuery().activityIdIn("invalid");
verifyQueryResults(query, 0);
try {
managementService.createJobDefinitionQuery().activityIdIn(null);
fail("A ProcessEngineExcpetion was expected.");
} catch (ProcessEngineException e) {
}
try {
managementService.createJobDefinitionQuery().activityIdIn((String) null);
fail("A ProcessEngineExcpetion was expected.");
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.management.JobDefinitionQuery in project camunda-bpm-platform by camunda.
the class JobDefinitionQueryTest method testQueryByActivityId.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn" })
public void testQueryByActivityId() {
JobDefinitionQuery query = managementService.createJobDefinitionQuery().activityIdIn("ServiceTask_1");
verifyQueryResults(query, 1);
query = managementService.createJobDefinitionQuery().activityIdIn("ServiceTask_1", "BoundaryEvent_1");
verifyQueryResults(query, 2);
query = managementService.createJobDefinitionQuery().activityIdIn("ServiceTask_1", "BoundaryEvent_1", "StartEvent_1");
verifyQueryResults(query, 3);
query = managementService.createJobDefinitionQuery().activityIdIn("ServiceTask_1", "BoundaryEvent_1", "StartEvent_1", "IntermediateCatchEvent_1");
verifyQueryResults(query, 4);
}
use of org.camunda.bpm.engine.management.JobDefinitionQuery in project camunda-bpm-platform by camunda.
the class JobDefinitionQueryTest method testQueryByProcessDefinitionId.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/mgmt/JobDefinitionQueryTest.testBase.bpmn" })
public void testQueryByProcessDefinitionId() {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
JobDefinitionQuery query = managementService.createJobDefinitionQuery().processDefinitionId(processDefinition.getId());
verifyQueryResults(query, 4);
}
Aggregations