Java Code Examples for org.camunda.bpm.engine.task.TaskQuery#caseInstanceBusinessKeyLike()
The following examples show how to use
org.camunda.bpm.engine.task.TaskQuery#caseInstanceBusinessKeyLike() .
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 |
@Deployment(resources={"org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn"}) public void testQueryByCaseInstanceBusinessKeyLike() { String caseDefinitionId = getCaseDefinitionId(); String businessKey = "aBusiness_Key"; caseService .withCaseDefinition(caseDefinitionId) .businessKey(businessKey) .create(); TaskQuery query = taskService.createTaskQuery(); query.caseInstanceBusinessKeyLike("aBus%"); verifyQueryResults(query, 1); query.caseInstanceBusinessKeyLike("%siness\\_Key"); verifyQueryResults(query, 1); query.caseInstanceBusinessKeyLike("%sines%"); verifyQueryResults(query, 1); query.caseInstanceBusinessKeyLike("%sines%"); verifyQueryResults(query, 1); }
Example 2
Source File: TaskQueryTest.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
public void testQueryByInvalidCaseInstanceBusinessKeyLike() { TaskQuery query = taskService.createTaskQuery(); query.caseInstanceBusinessKeyLike("invalid"); verifyQueryResults(query, 0); try { query.caseInstanceBusinessKeyLike(null); fail("expected exception"); } catch (ProcessEngineException e) { // OK } }