use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueLessThan.
public void testQueryByNullCaseInstanceVariableValueLessThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.caseInstanceVariableValueLessThan("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 testQueryByBooleanVariableValueNotEquals.
public void testQueryByBooleanVariableValueNotEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueNotEquals("aBooleanValue", false);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByIntegerCaseInstanceVariableValueEquals.
public void testQueryByIntegerCaseInstanceVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("anIntegerValue", 456).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueEquals("anIntegerValue", 456);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByNullVariableValueGreaterThanOrEqual.
public void testQueryByNullVariableValueGreaterThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.variableValueGreaterThanOrEqual("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 testQueryByCaseInstaceId.
public void testQueryByCaseInstaceId() {
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
List<CaseInstance> caseInstances = caseService.createCaseInstanceQuery().caseDefinitionKey(CASE_DEFINITION_KEY).list();
for (CaseInstance caseInstance : caseInstances) {
query.caseInstanceId(caseInstance.getId());
verifyQueryResults(query, 2);
}
CaseInstance instance = caseService.createCaseInstanceQuery().caseDefinitionKey(CASE_DEFINITION_KEY_2).singleResult();
query.caseInstanceId(instance.getId());
verifyQueryResults(query, 3);
}
Aggregations