use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByShortVariableValueGreaterThan.
public void testQueryByShortVariableValueGreaterThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aShortValue", (short) 123).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueGreaterThan("aShortValue", (short) 122);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDoubleCaseInstanceVariableValueGreaterThan.
public void testQueryByDoubleCaseInstanceVariableValueGreaterThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDoubleValue", 1.5).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueGreaterThan("aDoubleValue", 1.4);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByLongVariableValueNotEquals.
public void testQueryByLongVariableValueNotEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aLongValue", (long) 789).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueNotEquals("aLongValue", (long) 790);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByStringVariableValueLike.
public void testQueryByStringVariableValueLike() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aStringValue", "abc").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueLike("aStringValue", "ab%");
verifyQueryResults(query, 1);
query = caseService.createCaseExecutionQuery();
query.variableValueLike("aStringValue", "%bc");
verifyQueryResults(query, 1);
query = caseService.createCaseExecutionQuery();
query.variableValueLike("aStringValue", "%b%");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByNullVariableValueGreaterThan.
public void testQueryByNullVariableValueGreaterThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.variableValueGreaterThan("aNullValue", null).list();
fail();
} catch (NotValidException e) {
}
}
Aggregations