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

The following examples show how to use org.camunda.bpm.engine.runtime.CaseExecutionQuery#variableValueGreaterThan() . 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 testQueryByDateVariableValueGreaterThan() {
  Date now = new Date();

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

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

  query.variableValueGreaterThan("aDateValue", before);

  verifyQueryResults(query, 1);

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

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

  verifyQueryResults(query, 1);

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

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

  verifyQueryResults(query, 1);

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.variableValueGreaterThan("anIntegerValue", 455);

  verifyQueryResults(query, 1);

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.variableValueGreaterThan("aLongValue", (long) 788);

  verifyQueryResults(query, 1);

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

  CaseExecutionQuery query = caseService.createCaseExecutionQuery();

  query.variableValueGreaterThan("aDoubleValue", 1.4);

  verifyQueryResults(query, 1);

}