Closed saig0 closed 1 year ago
Describe the bug If I access a non-existing variable then the expression fails. To avoid failure, I must do a null check first.
x // failed to evaluate expression 'x': no variable found for name 'x'
The behavior is the same for path expressions. If I access a non-existing context entry, the expression fails.
{a: 1}.b // failed to evaluate expression '{a: 1}.b': context contains no entry with key 'b'
Related to https://github.com/camunda/feel-scala/issues/540. Related to https://github.com/camunda/feel-scala/issues/582.
To Reproduce Steps to reproduce the behavior:
x
Expected behavior The expression should return null if a variable or a context entry doesn't exist.
null
x = null {a: 1}.b = null {a: 1}.b.c = null null.b = null
If the path expression is applied to a filter and a context doesn't contain the entry, the resulting list should contain null for this item.
// non-member path filtering [ { x: 1 }, { y: 2 } ].y = [ null, 2 ] [ { x: 1 } ].y = [ null ]
The expected behavior is aligned with the DMN spec. It is verified by the TCK test cases:
Environment
1.16.0
ZPA triage:
Describe the bug If I access a non-existing variable then the expression fails. To avoid failure, I must do a null check first.
The behavior is the same for path expressions. If I access a non-existing context entry, the expression fails.
Related to https://github.com/camunda/feel-scala/issues/540. Related to https://github.com/camunda/feel-scala/issues/582.
To Reproduce Steps to reproduce the behavior:
x
Expected behavior The expression should return
null
if a variable or a context entry doesn't exist.If the path expression is applied to a filter and a context doesn't contain the entry, the resulting list should contain
null
for this item.The expected behavior is aligned with the DMN spec. It is verified by the TCK test cases:
Environment
1.16.0