use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDateVariableValueGreaterThan.
public void testQueryByDateVariableValueGreaterThan() {
Date now = new Date();
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDateValue", now).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
Date before = new Date(now.getTime() - 100000);
query.variableValueGreaterThan("aDateValue", before);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByLongCaseInstanceVariableValueLessThanOrEqual.
public void testQueryByLongCaseInstanceVariableValueLessThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aLongValue", (long) 789).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aLongValue", (long) 790);
verifyQueryResults(query, 2);
query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aLongValue", (long) 789);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByInvalidCaseExecutionId.
public void testQueryByInvalidCaseExecutionId() {
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseExecutionId("invalid");
verifyQueryResults(query, 0);
try {
query.caseExecutionId(null);
fail();
} catch (NotValidException e) {
}
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByBooleanCaseInstanceVariableValueGreaterThan.
public void testQueryByBooleanCaseInstanceVariableValueGreaterThan() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.caseInstanceVariableValueGreaterThan("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 testQueryByAvailable.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneMilestoneCase.cmmn" })
public void testQueryByAvailable() {
caseService.withCaseDefinitionByKey("oneMilestoneCase").create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.available();
verifyQueryResults(query, 1);
}
Aggregations