use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyCaseExecutionQueryTest method testQueryNoAuthenticatedTenants.
public void testQueryNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryByDoubleVariableValueGreaterThanOrEqual.
public void testQueryByDoubleVariableValueGreaterThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDoubleValue", 1.5).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.variableValueGreaterThanOrEqual("aDoubleValue", 1.4);
verifyQueryResults(query, 1);
query = caseService.createCaseExecutionQuery();
query.variableValueGreaterThanOrEqual("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 testQueryByDoubleCaseInstanceVariableValueLessThanOrEqual.
public void testQueryByDoubleCaseInstanceVariableValueLessThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aDoubleValue", 1.5).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("aDoubleValue", 1.6);
verifyQueryResults(query, 2);
query = caseService.createCaseExecutionQuery();
query.caseInstanceVariableValueLessThanOrEqual("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 testQueryByCaseDefinitionId.
public void testQueryByCaseDefinitionId() {
String caseDefinitionId = repositoryService.createCaseDefinitionQuery().caseDefinitionKey(CASE_DEFINITION_KEY).singleResult().getId();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
query.caseDefinitionId(caseDefinitionId);
verifyQueryResults(query, 8);
caseDefinitionId = repositoryService.createCaseDefinitionQuery().caseDefinitionKey(CASE_DEFINITION_KEY_2).singleResult().getId();
query.caseDefinitionId(caseDefinitionId);
verifyQueryResults(query, 3);
}
use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.
the class CaseExecutionQueryTest method testQueryBySerializableCaseInstanceVariableGreaterThan.
public void testQueryBySerializableCaseInstanceVariableGreaterThan() {
List<String> serializable = new ArrayList<String>();
serializable.add("one");
serializable.add("two");
serializable.add("three");
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aSerializableValue", serializable).create();
CaseExecutionQuery query = caseService.createCaseExecutionQuery();
try {
query.caseInstanceVariableValueGreaterThan("aSerializableValue", serializable).list();
fail();
} catch (ProcessEngineException e) {
}
}
Aggregations