camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
120 stars 50 forks source link

The invocation of a non-existing function should return null #670

Closed saig0 closed 1 year ago

saig0 commented 1 year ago

Describe the bug If I invoke a non-existing function, 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
    non_existing_function(10)
  2. Verify that the engine returns a failure:
    failed to evaluate expression 'non_existing_function(10)': no function found with name 'non_existing_function' and 1 parameters

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

Screenshot from 2023-07-04 13-31-05

(DMN 1.4, chapter 10.3.2.13.2, page 120)

Environment