Search in sources :

Example 26 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByCaseDefinitionKey.

public void testQueryByCaseDefinitionKey() {
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    query.caseDefinitionKey(CASE_DEFINITION_KEY_2);
    verifyQueryResults(query, 1);
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery)

Example 27 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryBySerializableVariableGreaterThanOrEqual.

public void testQueryBySerializableVariableGreaterThanOrEqual() {
    List<String> serializable = new ArrayList<String>();
    serializable.add("one");
    serializable.add("two");
    serializable.add("three");
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aSerializableValue", serializable).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    try {
        query.variableValueGreaterThanOrEqual("aSerializableValue", serializable).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : ArrayList(java.util.ArrayList) CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 28 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryWithoutQueryParameter.

public void testQueryWithoutQueryParameter() {
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    verifyQueryResults(query, 5);
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery)

Example 29 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryByShortVariableValueEquals.

public void testQueryByShortVariableValueEquals() {
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aShortValue", (short) 123).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    query.variableValueEquals("aShortValue", (short) 123);
    verifyQueryResults(query, 1);
}
Also used : CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery)

Example 30 with CaseInstanceQuery

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

the class CaseInstanceQueryTest method testQueryBySerializableVariableValueEquals.

public void testQueryBySerializableVariableValueEquals() {
    List<String> serializable = new ArrayList<String>();
    serializable.add("one");
    serializable.add("two");
    serializable.add("three");
    caseService.withCaseDefinitionByKey(CASE_DEFINITION_KEY).setVariable("aSerializableValue", serializable).create();
    CaseInstanceQuery query = caseService.createCaseInstanceQuery();
    try {
        query.variableValueEquals("aSerializableValue", serializable).list();
        fail();
    } catch (ProcessEngineException e) {
    }
}
Also used : ArrayList(java.util.ArrayList) CaseInstanceQuery(org.camunda.bpm.engine.runtime.CaseInstanceQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

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