use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByWithoutDecisionRequirementsDefinition.
@Test
public void queryByWithoutDecisionRequirementsDefinition() {
testRule.deploy(DRD_DISH_RESOURCE, DRD_SCORE_RESOURCE);
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
verifyQueryResults(query, 9);
verifyQueryResults(query.withoutDecisionRequirementsDefinition(), 4);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByName.
@Test
public void queryByName() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionName("Two");
verifyQueryResults(query, 1);
query.decisionDefinitionName("One");
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByKey.
@Test
public void queryByKey() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
// decision one
query.decisionDefinitionKey("one");
verifyQueryResults(query, 2);
// decision two
query.decisionDefinitionKey("two");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByDecisionRequirementsDefinitionId.
@Test
public void queryByDecisionRequirementsDefinitionId() {
testRule.deploy(DRD_DISH_RESOURCE, DRD_SCORE_RESOURCE);
List<DecisionRequirementsDefinition> drds = repositoryService.createDecisionRequirementsDefinitionQuery().orderByDecisionRequirementsDefinitionName().asc().list();
String dishDrdId = drds.get(0).getId();
String scoreDrdId = drds.get(1).getId();
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
verifyQueryResults(query.decisionRequirementsDefinitionId("non existing"), 0);
verifyQueryResults(query.decisionRequirementsDefinitionId(dishDrdId), 3);
verifyQueryResults(query.decisionRequirementsDefinitionId(scoreDrdId), 2);
}
use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method queryByInvalidCategoryLike.
@Test
public void queryByInvalidCategoryLike() {
DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
query.decisionDefinitionCategoryLike("invalid");
verifyQueryResults(query, 0);
try {
query.decisionDefinitionCategoryLike(null);
fail();
} catch (NotValidException e) {
// Expected exception
}
}
Aggregations