use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByBooleanVariableValueGreaterThan.
public void testQueryByBooleanVariableValueGreaterThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.variableValueGreaterThan("aBooleanValue", false).list();
fail();
} catch (NotValidException e) {
}
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDateVariableValueLessThan.
public void testQueryByDateVariableValueLessThan() {
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.variableValueLessThan("aDateValue", after);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByStringCaseInstanceVariableValueLessThanOrEqual.
public void testQueryByStringCaseInstanceVariableValueLessThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aStringValue", "abc").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aStringValue", "abd");
verifyQueryResults(query, 2);
query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aStringValue", "abc");
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDateVariableValueLessThanOrEqual.
public void testQueryByDateVariableValueLessThanOrEqual() {
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.variableValueLessThanOrEqual("aDateValue", after);
verifyQueryResults(query, 1);
query = caseService.createCaseExecutionQuery();
query.variableValueLessThanOrEqual("aDateValue", now);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByCaseDefinitionKey.
public void testQueryByCaseDefinitionKey() {
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseDefinitionKey(CASE_DEFINITION_KEY);
verifyQueryResults(query, 8);
query.caseDefinitionKey(CASE_DEFINITION_KEY_2);
verifyQueryResults(query, 3);
}
Aggregations