Java Code Examples for org.camunda.bpm.engine.runtime.CaseExecutionQuery#caseInstanceVariableValueLessThanOrEqual()

The following examples show how to use org.camunda.bpm.engine.runtime.CaseExecutionQuery#caseInstanceVariableValueLessThanOrEqual() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByStringCaseInstanceVariableValueLessThanOrEqual() {
  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("aStringValue", "abc")
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aStringValue", "abd");

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aStringValue", "abc");

  verifyQueryResults(query, 2);

}
 
Example 2
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByShortCaseInstanceVariableValueLessThanOrEqual() {
  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("aShortValue", (short) 123)
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aShortValue", (short) 124);

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aShortValue", (short) 123);

  verifyQueryResults(query, 2);

}
 
Example 3
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByIntegerCaseInstanceVariableValueLessThanOrEquals() {
  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("anIntegerValue", 456)
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("anIntegerValue", 457);

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("anIntegerValue", 456);

  verifyQueryResults(query, 2);

}
 
Example 4
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByLongCaseInstanceVariableValueLessThanOrEqual() {
  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("aLongValue", (long) 789)
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

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

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aLongValue", (long) 789);

  verifyQueryResults(query, 2);

}
 
Example 5
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByDateCaseInstanceVariableValueLessThanOrEqual() {
  Date now = new Date();

  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("aDateValue", now)
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  Date after = new Date(now.getTime() + 100000);

  query.caseInstanceVariableValueLessThanOrEqual("aDateValue", after);

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aDateValue", now);

  verifyQueryResults(query, 2);

}
 
Example 6
Source File: CaseExecutionQueryTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void testQueryByDoubleCaseInstanceVariableValueLessThanOrEqual() {
  caseService
    .withCaseDefinitionByKey(CASE_DEFINITION_KEY)
    .setVariable("aDoubleValue", 1.5)
    .create();

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aDoubleValue", 1.6);

  verifyQueryResults(query, 2);

  query = caseService.createCaseExecutionQuery();

  query.caseInstanceVariableValueLessThanOrEqual("aDoubleValue", 1.5);

  verifyQueryResults(query, 2);

}