Search in sources :

Example 66 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByBooleanVariableValueGreaterThan.

public void testQueryByBooleanVariableValueGreaterThan() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    try {
        query.variableValueGreaterThan("aBooleanValue", false).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 67 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByBooleanVariableValueGreaterThanOrEqual.

public void testQueryByBooleanVariableValueGreaterThanOrEqual() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    try {
        query.variableValueGreaterThanOrEqual("aBooleanValue", false).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 68 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByNullVariableValueLessThanOrEqual.

public void testQueryByNullVariableValueLessThanOrEqual() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aNullValue", null).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    try {
        query.variableValueLessThanOrEqual("aNullValue", null).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 69 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByInvalidSuperProcessInstanceId.

public void testQueryByInvalidSuperProcessInstanceId() {
    CaseInstanceQuery query = caseService.createCaseInstanceQuery().superProcessInstanceId("invalid");
    verifyQueryResults(query, 0);
    try {
        query.superProcessInstanceId(null);
        fail();
    } catch (NotValidException e) {
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery)

Example 70 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByInvalidSuperCaseInstanceId.

public void testQueryByInvalidSuperCaseInstanceId() {
    CaseInstanceQuery query = caseService.createCaseInstanceQuery().superCaseInstanceId("invalid");
    verifyQueryResults(query, 0);
    try {
        query.superCaseInstanceId(null);
        fail();
    } catch (NotValidException e) {
    // expected
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery)

Aggregations

CaseInstanceQuery (org.camunda.bpm.engine.runtime.CaseInstanceQuery)123 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)21 Deployment (org.camunda.bpm.engine.test.Deployment)10 NotValidException (org.camunda.bpm.engine.exception.NotValidException)9 ArrayList (java.util.ArrayList)8 CaseInstance (org.camunda.bpm.engine.runtime.CaseInstance)8 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)7 Date (java.util.Date)6 CaseExecutionQuery (org.camunda.bpm.engine.runtime.CaseExecutionQuery)4 CaseDefinition (org.camunda.bpm.engine.repository.CaseDefinition)3 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)2 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 CaseInstanceDto (org.camunda.bpm.engine.rest.dto.runtime.CaseInstanceDto)1 CaseExecution (org.camunda.bpm.engine.runtime.CaseExecution)1