use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class CaseInstanceQueryTest method testQueryByBooleanVariableValueEquals.
public void testQueryByBooleanVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
CaseInstanceQuery query = caseService.createCaseInstanceQuery();
query.variableValueEquals("aBooleanValue", true);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class CaseInstanceQueryTest method testQueryByInvalidDeploymentId.
public void testQueryByInvalidDeploymentId() {
CaseInstanceQuery query = caseService.createCaseInstanceQuery().deploymentId("invalid");
verifyQueryResults(query, 0);
try {
query.deploymentId(null);
fail();
} catch (NotValidException e) {
// expected
}
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class CaseInstanceQueryTest method testQueryBySuperProcessInstanceIdNested.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/runtime/superProcessWithCaseCallActivityInsideSubProcess.bpmn20.xml" })
public void testQueryBySuperProcessInstanceIdNested() {
String superProcessInstanceId = runtimeService.startProcessInstanceByKey("subProcessQueryTest").getId();
CaseInstanceQuery query = caseService.createCaseInstanceQuery().superProcessInstanceId(superProcessInstanceId);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class CaseInstanceQueryTest method testQueryByIntegerVariableValueEquals.
public void testQueryByIntegerVariableValueEquals() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("anIntegerValue", 456).create();
CaseInstanceQuery query = caseService.createCaseInstanceQuery();
query.variableValueEquals("anIntegerValue", 456);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.runtime.CaseInstanceQuery in project camunda-bpm-platform by camunda.
the class CaseInstanceQueryTest method testQueryByNullVariableValueGreaterThanOrEqual.
public void testQueryByNullVariableValueGreaterThanOrEqual() {
caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
CaseInstanceQuery query = caseService.createCaseInstanceQuery();
try {
query.variableValueGreaterThanOrEqual("aNullValue", null).list();
fail();
} catch (ProcessEngineException e) {
}
}
Aggregations