use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByBooleanCaseInstanceVariableValueEquals.
public void testQueryByBooleanCaseInstanceVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueEquals("aBooleanValue", true);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByStringVariableValueGreaterThanOrEqual.
public void testQueryByStringVariableValueGreaterThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aStringValue", "abc").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueGreaterThanOrEqual("aStringValue", "ab");
verifyQueryResults(query, 1);
query = caseService.createCaseExecutionQuery();
query.variableValueGreaterThanOrEqual("aStringValue", "abc");
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByShortCaseInstanceVariableValueNotEquals.
public void testQueryByShortCaseInstanceVariableValueNotEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aShortValue", (short) 123).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueNotEquals("aShortValue", (short) 124);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueGreaterThanOrEqual.
public void testQueryByNullCaseInstanceVariableValueGreaterThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.caseInstanceVariableValueGreaterThanOrEqual("aNullValue", null).list();
fail();
} catch (NotValidException e) {
}
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByActivityId.
public void testQueryByActivityId() {
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.activityId("PI_HumanTask_1");
verifyQueryResults(query, 5);
query.activityId("PI_HumanTask_2");
verifyQueryResults(query, 1);
}
Aggregations