Processing of nulls in dmn tables

Hello!
Tell me, is it possible to handle the value of null in the dmn table?
Particularly interested in the type of datetime. Can I give an example?

Hi @ntdim1973,

An example DMN table would certainly be useful so that we can understand what you want to achieve and where null comes into play.

Cheers,
Thorben

example_dt_null.dmn (2.0 KB)

How correctly in the given case to use and process null ?

Hi @ntdim1973,

currently, the Camunda FEEL engine doesn’t support null-checks. If you can’t prevent null values then you’ve two ways:

Does this help you?

Best regards,
Philipp

Could you give an example of using JUEL or Groovy in dmn?

Hi @ntdim1973,

you can set the expression language of the input entry. Please have a look at the documentation:

Does this help you?

Best regards,
Philipp

Hi @Philipp_Ossler
So by using “not(null)” we cannot evaluate a NULL value. Is it correct? Please confirm.

Hi @arunkumar ,

when you use the FEEL extension then you can write not(null). The expression is true when the input value is not null.

However, in most cases, you don’t need this check. You can add a rule at the button of the table which has no condition (i.e. - aka don’t care).

Does this help you?

Best regards,
Philipp

1 Like

Hi @Philipp_Ossler
If there is no condition specified, everything will be ignored which includes also a null value. In such time, our aim to check not(null) will be skipped where NULLS are also ignored if we specify no condition (don’t care). Kindly provide your idea.

Also,can i check the null value in a column as “NULL”?

Do you have any Example for JUEL to inline script check null values

Hi @Smith,

in JUEL, you can use the keyword empty to check if a value is null. For example, ${!empty myVariable}.

Does this help you?

Best regards,
Philipp

1 Like

In my case, i was getting null value from Database. In dmn i changed the HIT policy to First then it works. May be it is helpful to someone. Even it is posted a year ago.

Hi @Philipp_Ossler , is it possible to have a value say “All” instead of leaving it blank or -(aka don’t care). Reason I ask this is I have decision table meant to be read by business users. A column named state has predefined values(50 count) for US states. There are certain default rules which applies to all states & a blank cell or hyphen(-) isn’t very intuitive for end users to understand that this rule applies to all states. Instead the proposition was to have something like “All” or “ALL US STATES” which would internally translate to all the 50 states. Do you something like this could be achievable in a decision table?

:thinking: You could do something like that, for example, by defining a variable “ALL”.

However, I would recommend following the standard and using an empty condition. No additional customization. A person who knows DMN can understand your model.

2 Likes