Java Code Examples for org.camunda.bpm.engine.task.TaskQuery#caseInstanceVariableValueEquals()

The following examples show how to use org.camunda.bpm.engine.task.TaskQuery#caseInstanceVariableValueEquals() . 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: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByDateCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  Date now = new Date();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aDateValue", now)
    .create();

  TaskQuery query = taskService.createTaskQuery();

  query.caseInstanceVariableValueEquals("aDateValue", now);

  verifyQueryResults(query, 1);
}
 
Example 2
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByNullCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aNullValue", null)
    .create();

  TaskQuery query = taskService.createTaskQuery();

  query.caseInstanceVariableValueEquals("aNullValue", null);

  verifyQueryResults(query, 1);
}
 
Example 3
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByStringCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aStringValue", "abc")
    .create();

  TaskQuery query = taskService.createTaskQuery();

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

  verifyQueryResults(query, 1);
}
 
Example 4
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByBooleanCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aBooleanValue", true)
    .create();

  TaskQuery query = taskService.createTaskQuery();

  query.caseInstanceVariableValueEquals("aBooleanValue", true);

  verifyQueryResults(query, 1);
}
 
Example 5
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByShortCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aShortValue", (short) 123)
    .create();

  TaskQuery query = taskService.createTaskQuery();

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

  verifyQueryResults(query, 1);
}
 
Example 6
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByIntegerCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("anIntegerValue", 456)
    .create();

  TaskQuery query = taskService.createTaskQuery();

  query.caseInstanceVariableValueEquals("anIntegerValue", 456);

  verifyQueryResults(query, 1);
}
 
Example 7
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByLongCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aLongValue", (long) 789)
    .create();

  TaskQuery query = taskService.createTaskQuery();

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

  verifyQueryResults(query, 1);
}
 
Example 8
Source File: TaskQueryTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"})
public void testQueryByDoubleCaseInstanceVariableValueEquals() {
  String caseDefinitionId = getCaseDefinitionId();

  caseService
    .withCaseDefinition(caseDefinitionId)
    .setVariable("aDoubleValue", 1.5)
    .create();

  TaskQuery query = taskService.createTaskQuery();

  query.caseInstanceVariableValueEquals("aDoubleValue", 1.5);

  verifyQueryResults(query, 1);
}