DMN output variable is not getting bind properly

Hi,
I have this simple DMN


When I’m trying to evaluate it I’m getting below error.

FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression ‘Medium’: no variable found for name ‘Medium’

I’m not able to figure it out why it is taking “medium” as expression when it is a output. I have tried to keep only one output but still same issue
loan-risk.dmn (3.5 KB)
I have attached the dmn file also.
Thanks you.

Hi!
Welcome to the forum!

Sadly, what you’re seeing is a common starting error. Strings need to be enclosed with " so your rules would be:

< 600 | - | "High" | "Not Approved"
> 600 | < 650 | "Medium High" | "Approved"
> 650 | < 700 | "Medium" | "Approved"
>= 700 | - | "Low" | "Approved"

But this also looks like it can have some optimization to it…
You can look for ranges in Score (eg. 600…650 ), and output the Risk Associated, and feed the Risk Associated into another decision that sets Approved / Not Approved based on the Risk Associated.

2 Likes

Thank you for the solution. It worked

Please remember to mark the appropriate message as “Solution” if your issue is resolved. It will help others find answers quickly.

Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.