use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByShortCaseInstanceVariableValueEquals.
public void testQueryByShortCaseInstanceVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aShortValue", (short) 123).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueEquals("aShortValue", (short) 123);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDateCaseInstanceVariableValueLessThanOrEqual.
public void testQueryByDateCaseInstanceVariableValueLessThanOrEqual() {
Date now = new Date();
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDateValue", now).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
Date after = new Date(now.getTime() + 100000);
query.caseInstanceVariableValueLessThanOrEqual("aDateValue", after);
verifyQueryResults(query, 2);
query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aDateValue", now);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByByteArrayVariableValueNotEquals.
public void testQueryByByteArrayVariableValueNotEquals() {
byte[] bytes = "somebytes".getBytes();
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aByteArrayValue", bytes).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.variableValueNotEquals("aByteArrayValue", bytes).list();
fail();
} catch (ProcessEngineException e) {
}
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByStringCaseInstanceVariableValueLessThan.
public void testQueryByStringCaseInstanceVariableValueLessThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aStringValue", "abc").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThan("aStringValue", "abd");
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByStringVariableValueLessThan.
public void testQueryByStringVariableValueLessThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aStringValue", "abc").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueLessThan("aStringValue", "abd");
verifyQueryResults(query, 1);
}
Aggregations