I am trying to expose an spring boot API which gives me the minimum of three calculated loan Amount from a decision table.
I am not able to Parse the Feel expression. Please look into this. I have attached my code.
DMN Diagram
Java Code:
public String loanAmountEligibilityCalculator(LoanAmountEligibilityModel loanEligibilityInputs) {
Map<String, Object> vals = new HashMap<String, Object>();
vals.put("loanTenure", loanEligibilityInputs.getLoanTenure());
vals.put("savingAmount", loanEligibilityInputs.getSavingAmount());
vals.put("monthlyNetSalary", loanEligibilityInputs.getMonthlyIncome());
vals.put("appliedLoanAmount", 100000);
DmnDecisionTableResult decisionResult = decisionService
.evaluateDecisionTableByKey("CalculateFinalEligibleLoanAmount")
.variables(vals)
.evaluate();
String finalLoanAmountEligible = decisionResult.collectEntries("finalLoanAmountEligible").get(0).toString();
return finalLoanAmountEligible;
}
DMN File
Final_Loan_Eligibility_Amount.dmn (7.8 KB)
Gradle Content
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
compile group: 'org.camunda.bpm.springboot', name: 'camunda-bpm-spring-boot-starter', version: '7.13.0'
compile group: 'org.camunda.bpm.dmn', name: 'camunda-engine-dmn', version: '7.13.0'
Error:
error.txt (25.2 KB)