Search in sources :

Example 46 with NotValidException

use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueGreaterThanOrEqual.

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

Example 47 with NotValidException

use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByBooleanVariableValueLessThanOrEqual.

public void testQueryByBooleanVariableValueLessThanOrEqual() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aBooleanValue", true).create();
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    try {
        query.variableValueLessThanOrEqual("aBooleanValue", false).list();
        fail();
    } catch (NotValidException e) {
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Example 48 with NotValidException

use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByNullCaseInstanceVariableValueLessThan.

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

Example 49 with NotValidException

use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByNullVariableValueGreaterThanOrEqual.

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

Example 50 with NotValidException

use of org.camunda.bpm.engine.exception.NotValidException in project camunda-bpm-platform by camunda.

the class CaseExecutionQueryTest method testQueryByInvalidCaseInstanceId.

public void testQueryByInvalidCaseInstanceId() {
    CaseExecutionQuery query = caseService.createCaseExecutionQuery();
    query.caseInstanceId("invalid");
    verifyQueryResults(query, 0);
    try {
        query.caseInstanceId(null);
        fail();
    } catch (NotValidException e) {
    }
}
Also used : NotValidException(org.camunda.bpm.engine.exception.NotValidException) CaseExecutionQuery(org.camunda.bpm.engine.runtime.CaseExecutionQuery)

Aggregations

NotValidException (org.camunda.bpm.engine.exception.NotValidException)121 Test (org.junit.Test)28 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)24 CaseExecutionQuery (org.camunda.bpm.engine.runtime.CaseExecutionQuery)24 NotFoundException (org.camunda.bpm.engine.exception.NotFoundException)18 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)17 Deployment (org.camunda.bpm.engine.test.Deployment)12 CaseDefinitionQuery (org.camunda.bpm.engine.repository.CaseDefinitionQuery)10 DecisionDefinitionQuery (org.camunda.bpm.engine.repository.DecisionDefinitionQuery)10 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)10 CaseService (org.camunda.bpm.engine.CaseService)9 NotAllowedException (org.camunda.bpm.engine.exception.NotAllowedException)9 RestException (org.camunda.bpm.engine.rest.exception.RestException)8 CaseExecutionCommandBuilder (org.camunda.bpm.engine.runtime.CaseExecutionCommandBuilder)8 CaseInstanceQuery (org.camunda.bpm.engine.runtime.CaseInstanceQuery)8 ActivityInstance (org.camunda.bpm.engine.runtime.ActivityInstance)6 HashMap (java.util.HashMap)5 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)4 InputStream (java.io.InputStream)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)3