use of org.camunda.bpm.dmn.engine.DmnDecisionTableResult in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionTableByKeyAndLatestVersion.
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKeyAndLatestVersion() {
testRule.deploy(DMN_DECISION_TABLE_V2);
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY, createVariables());
assertThatDecisionHasResult(decisionResult, RESULT_OF_SECOND_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionTableResult in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionTableByKeyAndVersion.
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKeyAndVersion() {
testRule.deploy(DMN_DECISION_TABLE_V2);
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKeyAndVersion(DECISION_DEFINITION_KEY, 1, createVariables());
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionTableResult in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionTableByKey.
@Deployment(resources = DMN_DECISION_TABLE)
@Test
public void evaluateDecisionTableByKey() {
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY, createVariables());
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
use of org.camunda.bpm.dmn.engine.DmnDecisionTableResult in project camunda-bpm-platform by camunda.
the class DecisionServiceTest method evaluateDecisionWithRequiredDecisions.
@Deployment(resources = DRD_DISH_DECISION_TABLE)
@Test
public void evaluateDecisionWithRequiredDecisions() {
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey("dish-decision", Variables.createVariables().putValue("temperature", 32).putValue("dayType", "Weekend"));
assertThatDecisionHasResult(decisionResult, "Light salad");
}
use of org.camunda.bpm.dmn.engine.DmnDecisionTableResult in project camunda-bpm-platform by camunda.
the class MultiTenancyDecisionTableEvaluationTest method testEvaluateDecisionByKeyWithTenantIdDisabledTenantCheck.
public void testEvaluateDecisionByKeyWithTenantIdDisabledTenantCheck() {
processEngineConfiguration.setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
deploymentForTenant(TENANT_ONE, DMN_FILE);
DmnDecisionTableResult decisionResult = decisionService.evaluateDecisionTableByKey(DECISION_DEFINITION_KEY).decisionDefinitionTenantId(TENANT_ONE).variables(createVariables()).evaluate();
assertThatDecisionHasResult(decisionResult, RESULT_OF_FIRST_VERSION);
}
Aggregations