DMN Error : RestException while evaluating decision with key 'null'

Hi Everyone,

I am getting the below error "
“{
“type”: “RestException”,
“message”: “Cannot evaluate decision Discounts5:49:10ddf987-1f45-11ec-912c-f859715ce90f: Exception while evaluating decision with key ‘null’”
}”
when testing DMN table using rest API in postman. The URL is : http://localhost:8080/engine-rest/decision-definition/key/Discounts5/evaluate

Below is the request details.

{

"variables": {

    "adviserChannel": {

        "value": "CSP"

    },        

    "originalQuoteStartDate": {

        "value": "2021-01-10T00:00:00"

    },        

    "originalSubmissionDate": {

        "value": "2021-09-10T00:00:00"

    },        

    "countOfCovers": {

        "value": 3

    },        

    "hasCoversPaidAnnually": {

        "value": ""

    },        

    "coverType": {

        "value": "TPD"

    },        

    "hasLumpSum": {

        "value": true

    },        

    "ipCoverAmount": {

        "value": 3500

    },        

    "lifeCoverAmount": {

        "value": 500000

    },        

    "tpdCoverAmount": {

        "value": 500000

    },        

    "ciCoverAmount": {

        "value": 250000

    },        

    "ageNextBirthday": {

        "value": 62

    },        

    "occupationCategory": {

        "value": 1

    },        

    "hasStepped": {

        "value": false

    },        

    "BMI": {

        "value": 27.5

    },        

    "smokerStatus": {

        "value": "false"

    },        

    "hasLoadingOrExclusion": {

        "value": false

    },        

    "cspPreviouslyDeclined": {

        "value": true

    },        

    "commissionDialDownExists": {

        "value": true

    }

}

}

I am trying to test the condition in Row number 12 in the attached DMN table which should return me the result as “CSP V1” instead throwing up the error.

However, when I run the same request just by changing the originalQuoteStartDate value alone from “2021-01-10T00:00:00” to “2021-08-10T00:00:00” , I am getting the result successfully as
[

{

    "Discount": {

        "type": "String",

        "value": "Premium Discount",

        "valueInfo": {}

    }

}

]

{

"variables": {

    "adviserChannel": {

        "value": "CSP"

    },        

    "originalQuoteStartDate": {

        "value": "2021-08-10T00:00:00"

    },        

    "originalSubmissionDate": {

        "value": "2021-09-10T00:00:00"

    },        

    "countOfCovers": {

        "value": 3

    },        

    "hasCoversPaidAnnually": {

        "value": ""

    },        

    "coverType": {

        "value": "TPD"

    },        

    "hasLumpSum": {

        "value": true

    },        

    "ipCoverAmount": {

        "value": 3500

    },        

    "lifeCoverAmount": {

        "value": 500000

    },        

    "tpdCoverAmount": {

        "value": 500000

    },        

    "ciCoverAmount": {

        "value": 250000

    },        

    "ageNextBirthday": {

        "value": 62

    },        

    "occupationCategory": {

        "value": 1

    },        

    "hasStepped": {

        "value": false

    },        

    "BMI": {

        "value": 27.5

    },        

    "smokerStatus": {

        "value": "false"

    },        

    "hasLoadingOrExclusion": {

        "value": false

    },        

    "cspPreviouslyDeclined": {

        "value": true

    },        

    "commissionDialDownExists": {

        "value": true

    }

}

}

I am unable to identify the reason that’s causing the request to fail. Kindly advise.Discounts_Final.dmn (41.5 KB)

Hi @skbabu, I tried your example and the error I get is: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression '>= 3500': no variable found for name 'cellInput
When I check the DMN it appears an expression is missing for ipCoverAmount:
image

I believe the reason why it works when you modify the date is that it never reaches the problem column since the rule test fails earlier in the evaluation and so the rest of the rule is skipped. Put in an Expression for ipCoverAmount and it should work.

Joe

Hi Joe,

Thanks a lot for your response. Yes. Your suggestion worked. Sorry. My bad. I haven’t set up the input expression correctly. Can you please also advise where can I find the error logs you have provided below. I am using Windows 10 and Postman doesn’t give specific error. Thanks.

: FEEL/SCALA-01008 Error while evaluating expression: failed to evaluate expression '>= 3500': no variable found for name 'cellInput

No worries! The error message will be in the engine log file. If you tail it you should see it.

Joe