use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class CaseCallActivityTest method testCallCaseAsConstant.
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/callactivity/CaseCallActivityTest.testCallCaseAsConstant.bpmn20.xml", "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testCallCaseAsConstant() {
// given
// a deployed process definition and case definition
// when
String superProcessInstanceId = startProcessInstanceByKey(PROCESS_DEFINITION_KEY).getId();
// then
String callActivityId = queryExecutionByActivityId(CALL_ACTIVITY_ID).getId();
CaseExecutionEntity subCaseInstance = (CaseExecutionEntity) queryOneTaskCaseInstance();
assertNotNull(subCaseInstance);
assertEquals(callActivityId, subCaseInstance.getSuperExecutionId());
// complete
String humanTaskId = queryCaseExecutionByActivityId(HUMAN_TASK_ID).getId();
complete(humanTaskId);
close(subCaseInstance.getId());
assertProcessEnded(superProcessInstanceId);
}
use of org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity in project camunda-bpm-platform by camunda.
the class CaseCallActivityTest method testInputBusinessKey.
@Deployment(resources = { "org/camunda/bpm/engine/test/bpmn/callactivity/CaseCallActivityTest.testInputBusinessKey.bpmn20.xml", "org/camunda/bpm/engine/test/api/cmmn/oneTaskCase.cmmn" })
public void testInputBusinessKey() {
// given
String businessKey = "myBusinessKey";
// when
String superProcessInstanceId = startProcessInstanceByKey(PROCESS_DEFINITION_KEY, null, businessKey).getId();
// then
String callActivityId = queryExecutionByActivityId(CALL_ACTIVITY_ID).getId();
CaseExecutionEntity subCaseInstance = (CaseExecutionEntity) queryOneTaskCaseInstance();
assertNotNull(subCaseInstance);
assertEquals(callActivityId, subCaseInstance.getSuperExecutionId());
assertEquals(businessKey, subCaseInstance.getBusinessKey());
// complete ////////////////////////////////////////////////////////
String humanTaskId = queryCaseExecutionByActivityId(HUMAN_TASK_ID).getId();
complete(humanTaskId);
close(subCaseInstance.getId());
assertProcessEnded(superProcessInstanceId);
}
Aggregations