@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneProcessTaskCase.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsConstant() { // given String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testCallProcessAsExpressionStartsWithHash.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsExpressionStartsWithHash() { // given // a deployed case definition String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, Variables.createVariables().putValue("process", "oneTaskProcess")).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testCallProcessAsExpressionStartsWithDollar.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsExpressionStartsWithDollar() { // given // a deployed case definition String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, Variables.createVariables().putValue("process", "oneTaskProcess")).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testInputBusinessKey.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testInputBusinessKey() { // given String businessKey = "myBusinessKey"; String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, businessKey).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); // the business key has been set assertEquals(businessKey, processInstance.getBusinessKey()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
@Deployment(resources = { "org/camunda/bpm/engine/test/api/cmmn/oneProcessTaskCase.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsConstant() { // given String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testCallProcessAsExpressionStartsWithHash.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsExpressionStartsWithHash() { // given // a deployed case definition String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, Variables.createVariables().putValue("process", "oneTaskProcess")).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testCallProcessAsExpressionStartsWithDollar.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testCallProcessAsExpressionStartsWithDollar() { // given // a deployed case definition String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, Variables.createVariables().putValue("process", "oneTaskProcess")).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/processtask/ProcessTaskTest.testInputBusinessKey.cmmn", "org/camunda/bpm/engine/test/api/oneTaskProcess.bpmn20.xml" }) public void testInputBusinessKey() { // given String businessKey = "myBusinessKey"; String caseInstanceId = createCaseInstanceByKey(ONE_PROCESS_TASK_CASE, businessKey).getId(); String processTaskId = queryCaseExecutionByActivityId(PROCESS_TASK).getId(); // then // there exists a process instance ExecutionEntity processInstance = (ExecutionEntity) queryProcessInstance(); assertNotNull(processInstance); // the case instance id is set on called process instance assertEquals(caseInstanceId, processInstance.getCaseInstanceId()); // the super case execution id is equals the processTaskId assertEquals(processTaskId, processInstance.getSuperCaseExecutionId()); // the business key has been set assertEquals(businessKey, processInstance.getBusinessKey()); TaskEntity task = (TaskEntity) queryTask(); // the case instance id has been also set on the task assertEquals(caseInstanceId, task.getCaseInstanceId()); // the case execution id should be null assertNull(task.getCaseExecutionId()); // complete //////////////////////////////////////////////////////// taskService.complete(task.getId()); assertProcessEnded(processInstance.getId()); close(caseInstanceId); assertCaseEnded(caseInstanceId); }
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());
assertEquals(processTaskId, processInstance.getSuperCaseExecutionId());