Search in sources :

Example 31 with CaseExecutionQuery

use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueEquals.

public void testQueryByNullCaseInstanceVariableValueEquals() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    query.caseInstanceVariableValueEquals("aNullValue", null);
    verifyQueryResults(query, 2);
}
Also used : CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Example 32 with CaseExecutionQuery

use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByShortCaseInstanceVariableValueGreaterThan.

public void testQueryByShortCaseInstanceVariableValueGreaterThan() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aShortValue", (short) 123).create();
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    query.caseInstanceVariableValueGreaterThan("aShortValue", (short) 122);
    verifyQueryResults(query, 2);
}
Also used : CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Example 33 with CaseExecutionQuery

use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueLike.

public void testQueryByNullCaseInstanceVariableValueLike() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    try {
        query.caseInstanceVariableValueLike("aNullValue", null).list();
        fail();
    } catch (NotValidException e) {
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Example 34 with CaseExecutionQuery

use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryBySerializableCaseInstanceVariableLessThan.

public void testQueryBySerializableCaseInstanceVariableLessThan() {
    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.caseInstanceVariableValueLessThan("aSerializableValue", serializable).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : ArrayList(java.util.ArrayList) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException) CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Example 35 with CaseExecutionQuery

use of org.camunda.bpm.engine.runtime.CaseExecutionQuery in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByByteArrayCaseInstanceVariableValueGreaterThanOrEqual.

public void testQueryByByteArrayCaseInstanceVariableValueGreaterThanOrEqual() {
    byte[] bytes = "somebytes".getBytes();
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aByteArrayValue", bytes).create();
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    try {
        query.caseInstanceVariableValueGreaterThanOrEqual("aByteArrayValue", bytes).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException) CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Aggregations

CaseExecutionQuery (org.camunda.bpm.engine.runtime.CaseExecutionQuery)226 Deployment (org.camunda.bpm.engine.test.Deployment)70 CaseExecution (org.camunda.bpm.engine.runtime.CaseExecution)47 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)24 NotValidException (org.camunda.bpm.engine.exception.NotValidException)24 CaseInstance (org.camunda.bpm.engine.runtime.CaseInstance)16 ArrayList (java.util.ArrayList)14 VariableInstance (org.camunda.bpm.engine.runtime.VariableInstance)13 Date (java.util.Date)12 Task (org.camunda.bpm.engine.task.Task)10 VariableMap (org.camunda.bpm.engine.variable.VariableMap)9 HashMap (java.util.HashMap)8 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)4 CaseInstanceQuery (org.camunda.bpm.engine.runtime.CaseInstanceQuery)4 CaseService (org.camunda.bpm.engine.CaseService)2 NotAllowedException (org.camunda.bpm.engine.exception.NotAllowedException)2 DescribesScenario (org.camunda.bpm.qa.upgrade.DescribesScenario)2 ScenarioSetup (org.camunda.bpm.qa.upgrade.ScenarioSetup)2 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 CaseExecutionDto (org.camunda.bpm.engine.rest.dto.runtime.CaseExecutionDto)1