Issues handling nulls for integer/long/double for DMN

Hello!

Pending question
Is there a way to account for nulls through DMN to say that if an integer/long/double field was left as null, that a rule could be used to handle this situation?

Every time I try to pass in a null value for one of these data types, I get the Error in Execution “Expected ‘Number’, got ‘NULL’”

Some background
I am working with a complex DMN where the goal of the DMN is to return back groupIDs of sets of questions to be returned to a service to pull up new questions based off previously answered questions.

With this buildout, we are looking to have the DMN be able to process through data that has been entered in by a user, as well as account for some questions that may not have been answered yet to decide if the DMN should return the same question set to be completed (based off of our desire to allow users to skip around to different sections of questions), or to know that the first question set was completed and the next set of questions can be served up next.

Through testing the DMN, I found that null checks were going to be a large portion of our buildout. Through some research and testing I was able to find that String fields can accommodate a null check with a simple “” or not(“”). However, I found that Camunda does not have an easy null check for Booleans or integers.

For my use case of checking if a question was answered “true”, “false”, or left unanswered, I realized that Booleans were not supported in Camunda with a null/“unanswered” option. As such, fields intended with an “unanswered” option have been converted to a String type instead.

However, for Integers, Longs, or Doubles, it looks like DMN does not support nulls and the only thing I have been able to think of would be to convert these types to strings, but that would cause the losing of multiple comparison operators for non-null values that I am also looking to support.

Again Is there a way to account for nulls through DMN to say that if an integer/long/double field was left as null, that a rule could be used to handle this situation?

This would allow our application to know that this value has not yet been determined, and handle the situation accordingly.

Looking forward to hearing any thoughts or suggestions! Thanks!
-Gage

Hello @Gage_Z,

the feel-scala community extension supports null values: https://github.com/camunda/feel-scala

Hope this helps, Ingo