use of org.camunda.bpm.engine.runtime.CaseInstance in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionTaskTest method testEvaluateDecisionRefTenantIdExpression.
public void testEvaluateDecisionRefTenantIdExpression() {
deployment(CMMN_EXPR);
deploymentForTenant(TENANT_ONE, DMN_FILE);
deploymentForTenant(TENANT_TWO, DMN_FILE_VERSION_TWO);
CaseInstance caseInstance = createCaseInstance(CASE_DEFINITION_KEY);
assertThat((String) caseService.getVariable(caseInstance.getId(), "decisionVar"), is(RESULT_OF_VERSION_ONE));
}
use of org.camunda.bpm.engine.runtime.CaseInstance in project camunda-bpm-platform by camunda.
the class DmnDecisionTaskTest method testCallLatestCase.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/decisiontask/DmnDecisionTaskTest.testCallLatestDecision.cmmn", DECISION_OKAY_DMN })
public void testCallLatestCase() {
// given
String deploymentId = repositoryService.createDeployment().addClasspathResource(DECISION_NOT_OKAY_DMN).deploy().getId();
CaseInstance caseInstance = createCaseInstanceByKey(CASE_KEY);
// then
assertNull(queryCaseExecutionByActivityId(DECISION_TASK));
assertEquals("not okay", getDecisionResult(caseInstance));
repositoryService.deleteDeployment(deploymentId, true);
}
use of org.camunda.bpm.engine.runtime.CaseInstance in project camunda-bpm-platform by camunda.
the class DmnDecisionTaskTest method testCallDecisionByVersionAsExpressionStartsWithHash.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/decisiontask/DmnDecisionTaskTest.testCallDecisionByVersionAsExpressionStartsWithHash.cmmn", DECISION_OKAY_DMN })
public void testCallDecisionByVersionAsExpressionStartsWithHash() {
// given
String deploymentId = repositoryService.createDeployment().addClasspathResource(DECISION_NOT_OKAY_DMN).deploy().getId();
CaseInstance caseInstance = createCaseInstanceByKey(CASE_KEY, Variables.createVariables().putValue("myVersion", 2));
// then
assertNull(queryCaseExecutionByActivityId(DECISION_TASK));
assertEquals("not okay", getDecisionResult(caseInstance));
repositoryService.deleteDeployment(deploymentId, true);
}
use of org.camunda.bpm.engine.runtime.CaseInstance in project camunda-bpm-platform by camunda.
the class DmnDecisionTaskTest method testCallDecisionByDeployment.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/decisiontask/DmnDecisionTaskTest.testCallDecisionByDeployment.cmmn", DECISION_OKAY_DMN })
public void testCallDecisionByDeployment() {
// given
String deploymentId = repositoryService.createDeployment().addClasspathResource(DECISION_NOT_OKAY_DMN).deploy().getId();
CaseInstance caseInstance = createCaseInstanceByKey(CASE_KEY);
// then
assertNull(queryCaseExecutionByActivityId(DECISION_TASK));
assertEquals("okay", getDecisionResult(caseInstance));
repositoryService.deleteDeployment(deploymentId, true);
}
use of org.camunda.bpm.engine.runtime.CaseInstance in project camunda-bpm-platform by camunda.
the class DmnDecisionTaskTest method testCallDecisionByVersion.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/decisiontask/DmnDecisionTaskTest.testCallDecisionByVersion.cmmn", DECISION_OKAY_DMN })
public void testCallDecisionByVersion() {
// given
String deploymentId = repositoryService.createDeployment().addClasspathResource(DECISION_NOT_OKAY_DMN).deploy().getId();
CaseInstance caseInstance = createCaseInstanceByKey(CASE_KEY);
// then
assertNull(queryCaseExecutionByActivityId(DECISION_TASK));
assertEquals("not okay", getDecisionResult(caseInstance));
repositoryService.deleteDeployment(deploymentId, true);
}
Aggregations