Search in sources :

Example 16 with DecisionDefinitionQuery

use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.

the class DecisionDefinitionQueryTest method queryByLatest.

@Test
public void queryByLatest() {
    DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
    query.latestVersion();
    verifyQueryResults(query, 3);
    query.decisionDefinitionKey("one").latestVersion();
    verifyQueryResults(query, 1);
    query.decisionDefinitionKey("two").latestVersion();
    verifyQueryResults(query, 1);
}
Also used : DecisionDefinitionQuery(org.camunda.bpm.engine.repository.DecisionDefinitionQuery) Test(org.junit.Test)

Example 17 with DecisionDefinitionQuery

use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.

the class DecisionDefinitionQueryTest method queryByDeploymentId.

@Test
public void queryByDeploymentId() {
    DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
    query.deploymentId(firstDeploymentId);
    verifyQueryResults(query, 2);
}
Also used : DecisionDefinitionQuery(org.camunda.bpm.engine.repository.DecisionDefinitionQuery) Test(org.junit.Test)

Example 18 with DecisionDefinitionQuery

use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.

the class DecisionDefinitionQueryTest method queryByInvalidNameLike.

@Test
public void queryByInvalidNameLike() {
    DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
    query.decisionDefinitionNameLike("%invalid%");
    verifyQueryResults(query, 0);
    try {
        query.decisionDefinitionNameLike(null);
        fail();
    } catch (NotValidException e) {
    // Expected exception
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) DecisionDefinitionQuery(org.camunda.bpm.engine.repository.DecisionDefinitionQuery) Test(org.junit.Test)

Example 19 with DecisionDefinitionQuery

use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.

the class DecisionDefinitionQueryTest method queryByCategory.

@Test
public void queryByCategory() {
    DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
    query.decisionDefinitionCategory("Examples");
    verifyQueryResults(query, 2);
}
Also used : DecisionDefinitionQuery(org.camunda.bpm.engine.repository.DecisionDefinitionQuery) Test(org.junit.Test)

Example 20 with DecisionDefinitionQuery

use of org.camunda.bpm.engine.repository.DecisionDefinitionQuery in project camunda-bpm-platform by camunda.

the class DecisionDefinitionQueryTest method queryByCategoryLike.

@Test
public void queryByCategoryLike() {
    DecisionDefinitionQuery query = repositoryService.createDecisionDefinitionQuery();
    query.decisionDefinitionCategoryLike("%Example%");
    verifyQueryResults(query, 3);
    query.decisionDefinitionCategoryLike("%amples2");
    verifyQueryResults(query, 1);
    query.decisionDefinitionCategoryLike("%z\\_");
    verifyQueryResults(query, 1);
}
Also used : DecisionDefinitionQuery(org.camunda.bpm.engine.repository.DecisionDefinitionQuery) Test(org.junit.Test)

Aggregations

DecisionDefinitionQuery (org.camunda.bpm.engine.repository.DecisionDefinitionQuery)49 Test (org.junit.Test)23 NotValidException (org.camunda.bpm.engine.exception.NotValidException)10 DecisionDefinition (org.camunda.bpm.engine.repository.DecisionDefinition)10 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 DecisionDefinitionQueryDto (org.camunda.bpm.engine.rest.dto.repository.DecisionDefinitionQueryDto)2 Deployment (org.camunda.bpm.engine.test.Deployment)2 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 DecisionRequirementsDefinition (org.camunda.bpm.engine.repository.DecisionRequirementsDefinition)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 DecisionDefinitionDto (org.camunda.bpm.engine.rest.dto.repository.DecisionDefinitionDto)1