camunda/feel-scala

The access of a non-existing property should return null

saig0 opened this issue · 0 comments

saig0 commented

Describe the bug
If I access a non-existing property of value (e.g. the seconds of a years and months duration), the engine returns a failure. But it should be more friendly and return null instead.

To Reproduce
Steps to reproduce the behavior:

  1. Evaluate the following expression
@"P1Y".seconds
  1. Verify that the engine returns a failure:
failed to evaluate expression '@"P1Y".seconds': No property found with name 'seconds' of value 'P1Y'. Available properties: years,months

Expected behavior
According to the DMN spec, the access of a non-existing property should return null.

Screenshot from 2023-09-08 14-19-44

(DMN 1.5, chapter 10.3.2.15, page 133)

Environment

  • FEEL engine version: 1.16
  • Affects:
    • Camunda Automation Platform 7: [7.x]
    • Zeebe broker: [0.x]