use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionEvaluationTest method testEvaluateDecisionByKeyVersionAndTenantId.
public void testEvaluateDecisionByKeyVersionAndTenantId() {
deploymentForTenant(TENANT_ONE, DMN_FILE);
deploymentForTenant(TENANT_TWO, DMN_FILE);
deploymentForTenant(TENANT_TWO, DMN_FILE_SECOND_VERSION);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).version(1).decisionDefinitionTenantId(TENANT_TWO).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 testEvaluateDecisionByKeyWithoutTenantIdNoAuthenticatedTenants.
public void testEvaluateDecisionByKeyWithoutTenantIdNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
deployment(DMN_FILE);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).decisionDefinitionWithoutTenantId().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 testEvaluateDecisionByKeyWithTenantIdDisabledTenantCheck.
public void testEvaluateDecisionByKeyWithTenantIdDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
deploymentForTenant(TENANT_ONE, DMN_FILE);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).decisionDefinitionTenantId(TENANT_ONE).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 testEvaluateDecisionByKeyWithoutTenantId.
public void testEvaluateDecisionByKeyWithoutTenantId() {
deployment(DMN_FILE);
DmnDecisionResult decisionResult = decisionService.evaluateDecisionByKey(DECISION_DEFINITION_KEY).variables(createVariables()).decisionDefinitionWithoutTenantId().evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionResult in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionById.
@Deployment(resources = DMN_DECISION_LITERAL_EXPRESSION)
@Test
public void evaluateDecisionById() {
DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().singleResult();
DmnDecisionResult decisionResult = decisionService.evaluateDecisionById(decisionDefinition.getId()).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
Aggregations