use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDoubleCaseInstanceVariableValueEquals.
public void testQueryByDoubleCaseInstanceVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDoubleValue", 1.5).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueEquals("aDoubleValue", 1.5);
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByCaseExecutionId.
public void testQueryByCaseExecutionId() {
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
List<CaseExecution> executions = caseService.createCaseExecutionQuery().caseDefinitionKey(CASE_DEFINITION_KEY_2).list();
for (CaseExecution execution : executions) {
query.caseExecutionId(execution.getId());
verifyQueryResults(query, 1);
}
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByNullVariableValueLike.
public void testQueryByNullVariableValueLike() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.variableValueLike("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 testQueryByDoubleVariableValueEquals.
public void testQueryByDoubleVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDoubleValue", 1.5).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueEquals("aDoubleValue", 1.5);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDateCaseInstanceVariableValueNotEquals.
public void testQueryByDateCaseInstanceVariableValueNotEquals() {
Date now = new Date();
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDateValue", now).create();
Date before = new Date(now.getTime() - 100000);
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueNotEquals("aDateValue", before);
verifyQueryResults(query, 2);
}
Aggregations