use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByLatest.
public void testQueryByLatest() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.latestVersion();
verifyQueryResults(query, 3);
query.caseDefinitionKey("one").latestVersion();
verifyQueryResults(query, 1);
query.caseDefinitionKey("two").latestVersion();
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByCategoryLike.
public void testQueryByCategoryLike() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionCategoryLike("%Example%");
verifyQueryResults(query, 3);
query.caseDefinitionCategoryLike("%amples2");
verifyQueryResults(query, 1);
query.caseDefinitionCategoryLike("%z\\_");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testInvalidUsageOfLatest.
public void testInvalidUsageOfLatest() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
try {
query.caseDefinitionId("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionName("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionNameLike("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.caseDefinitionVersion(1).latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
try {
query.deploymentId("test").latestVersion().list();
fail();
} catch (NotValidException e) {
// Expected exception
}
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByResourceNameLike.
public void testQueryByResourceNameLike() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionResourceNameLike("%ree%");
verifyQueryResults(query, 1);
query.caseDefinitionResourceNameLike("%e\\_%");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.repository.CaseDefinitionQuery in project camunda-bpm-platform by camunda.
the class CaseDefinitionQueryTest method testQueryByKeyLike.
public void testQueryByKeyLike() {
CaseDefinitionQuery query = repositoryService.createCaseDefinitionQuery();
query.caseDefinitionKeyLike("%o%");
verifyQueryResults(query, 3);
query.caseDefinitionKeyLike("%z\\_");
verifyQueryResults(query, 1);
}
Aggregations