Package org.camunda.bpm.engine.runtime

Examples of org.camunda.bpm.engine.runtime.CaseInstanceQuery


  private void createCaseInstanceMock() {
    List<CaseInstance> caseInstances = new ArrayList<CaseInstance>();
    CaseInstance mockCaseInstance = MockProvider.createMockCaseInstance();
    caseInstances.add(mockCaseInstance);

    CaseInstanceQuery mockCaseInstanceQuery = mock(CaseInstanceQuery.class);
    when(mockCaseInstanceQuery.list()).thenReturn(caseInstances);
    when(mockCaseService.createCaseInstanceQuery()).thenReturn(mockCaseInstanceQuery);
  }
View Full Code Here


    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aLongValue", (long) 789)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    query.variableValueNotEquals("aLongValue", (long) 790);

    verifyQueryResults(query, 1);
  }
View Full Code Here

      .setVariable("aDateValue", now)
      .create();

    Date before = new Date(now.getTime() - 100000);

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    query.variableValueNotEquals("aDateValue", before);

    verifyQueryResults(query, 1);
  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aDoubleValue", 1.5)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    query.variableValueNotEquals("aDoubleValue", 1.6);

    verifyQueryResults(query, 1);
  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aByteArrayValue", bytes)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    try {
      query.variableValueNotEquals("aByteArrayValue", bytes).list();
      fail();
    } catch (ProcessEngineException e) {}
  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aSerializableValue", serializable)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    try {
      query.variableValueNotEquals("aSerializableValue", serializable).list();
      fail();
    } catch (ProcessEngineException e) {}
  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aNullValue", null)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    try {
      query.variableValueGreaterThan("aNullValue", null).list();
      fail();
    } catch (ProcessEngineException e) {}

  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aStringValue", "abc")
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    query.variableValueGreaterThan("aStringValue", "ab");

    verifyQueryResults(query, 1);

  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aBooleanValue", true)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    try {
      query.variableValueGreaterThan("aBooleanValue", false).list();
      fail();
    } catch (ProcessEngineException e) {}

  }
View Full Code Here

    caseService
      .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
      .setVariable("aShortValue", (short) 123)
      .create();

    CaseInstanceQuery query = caseService.createCaseInstanceQuery();

    query.variableValueGreaterThan("aShortValue", (short) 122);

    verifyQueryResults(query, 1);

  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.runtime.CaseInstanceQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.