DMN - FEEL expression between dates check - ValString ValDate conflict

I am seeing an error while running date between in decision rule.

My goal is to check if the date falls under year end holidays… 21st Dec to 2nd Jan. My input variable datatype is Date, not sure why the ValString is happening.

2023-08-09 is my input data supplied to the decision rule.

Expected to evaluate decision ‘Decision_05558n0’, but failed to evaluate expression ‘[date(“2023-12-21”)…date(“2024-01-02”)]’: ValString(2023-08-09) can not be compared to ValDate(2023-12-21)

Type-
Trial Cluster
Generation-
Camunda Platform 8.2.10 + Zeebe 8.2 DMN Prototype
Region-
Sydney

Any help or pointers appreciated.
Many thanks!

Welcome back!

Can you post a reproduction DMN?
I have a funny feeling that your input variable is not actually a date, but becoming a string.

Thanks for your reply.

Here is the dmn file.

I checked below things already to make sure the datatype is in fact “Date”.
a. DMN input variable typeRef=“date”
b. In the process definition where I am invoking the decision table, I am calling date() function. See image attached. variable inputDate
c. In the form where input is captured, the datatype is “Date”. See image 3.

It could be that I am making some silly thing somewhere, but can’t figure out !

daytripsupervisor.dmn (5.7 KB)

Loading your DMN to Camunda DMN-Simulator
In order to get it to simulate, I had to change all your date() functions to also include the time.
I also think you want to use “First” rather than “Rule Order”, otherwise Veeresh will be added to the end of the supervisor result every time (since they are a “catch-all”)

You’ll probably have to post a Repro BPMN to also get this sorted out. If can be as simple as a Start → Script Task (to set the variables) → DMN → End

About the changes to date() functions, I don’t suppose it was required as I tested the DMN plus BPMN earlier; the end to end flow was working. That is, without the troublemaking “between rule”, which I added later on to make the DMN a bit more complex.

I will dig in a bit more later and see if I get to make any progress.

I got it working, finally !

I made only one edit to the input expression - see below … to force it as a “date” datatype element.

date(inputDate)

The revised DMN is attached, along with sample execution Output screenshot

daytripsupervisor-2.dmn (5.7 KB)

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