DMN with type "time" not working as expected

Hi camunda community,

I’m facing an issue with Camunda 8.6.12 (SAAS) DMN engine when using an attribute with type “time” as an input parameter. I have created the following DMN table. The DMN is part of a bpmn flow. the variables “dayOfWeek” and “incidentTime” are mapped on the BPMN task:
dayOfWeek: day of week(date and time(incidentTimestamp))
incidentTime: time (date and time(incidentTimestamp))

If I provide as input a time within the configured range between 05:00 and 08:00 like this

image

None of the rules, which are configured with “time” fires:

I have tried several different types of time zone formats:

  • “06:00:00@Europe/Berlin”
  • “06:00:00+01:00”
  • “06:00:00Z”
  • “06:00”

Do you have any ideas how to solve this issue?

Thanks for your support!
Bernd

Hi @fockeb - can you attach the DMN? I suspect that the range function doesn’t work with the time data type, but I admit I’m not certain and will need to look into it. It doesn’t match the last rule because the Incident Time doesn’t match. But if you can share this DMN, I can do some further testing!

I found the folution: I have to convert the time variable in the DMN to time:

Thanks!
Bernd

3 Likes

Thank you for sharing your solution. :+1:

I created the following feature request for it: [DMN] Convert string value to input type · Issue #30144 · camunda/camunda · GitHub

3 Likes

@Philipp_Ossler there was another thread on the forum that was supposed to result in a feature request as well… also relating to passing the variable types (similar to how C7 does it) since JSON isn’t type-safe. Might be worth while to link the two of those, since solving the generic case of “hinting” the variable type would also solve this issue.

1 Like

@Philipp_Ossler thanks for creating the feature request. This would be for sure the more intuitive solution!
Bernd

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