use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByKeyForAnyTenants.
public void testEvaluateDecisionByKeyForAnyTenants() {
deploymentForTenant(TENANT_ONE, DMN_FILE);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByKeyAndTenantId.
public void testEvaluateDecisionByKeyAndTenantId() {
deploymentForTenant(TENANT_ONE, DMN_FILE);
deploymentForTenant(TENANT_TWO, DMN_FILE_SECOND_VERSION);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).decisionDefinitionTenantId(TENANT_ONE).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByKeyWithAuthenticatedTenant.
public void testEvaluateDecisionByKeyWithAuthenticatedTenant() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
deploymentForTenant(TENANT_ONE, DMN_FILE);
deploymentForTenant(TENANT_TWO, DMN_FILE_SECOND_VERSION);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByKeyLatestVersionAndTenantId.
public void testEvaluateDecisionByKeyLatestVersionAndTenantId() {
deploymentForTenant(TENANT_ONE, DMN_FILE);
deploymentForTenant(TENANT_ONE, DMN_FILE_SECOND_VERSION);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).decisionDefinitionTenantId(TENANT_ONE).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_SECOND_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByIdAuthenticatedTenant.
public void testEvaluateDecisionByIdAuthenticatedTenant() {
deploymentForTenant(TENANT_ONE, DMN_FILE);
DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().singleResult();
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));
DmnDecisionResult decisionResult = decisionService.evaluateDecisionById(decisionDefinition.getId()).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
Aggregations