I have an input as list of Datatype 'MyType' with some string fields (defined as itemComponent).
MyType: {"partner": "xyz", "start": "2020-01-01", ...} A DMN sort() tries to sort the list. After that, I add an info object to each object of MyType.
context put(myObject, {"position": 1, "name": "x"})
Now, I try to call function (BKF) with parameter MyType, giving the result of 'context put'. If the function tries to access a field like:
Literal Expression: if myObject.partner="X" then true else false
the call fails. The call is done inside of another sort() function and I get the error message:
FEEL Error: ...The parameter 'list', in function sort(), raised an exception while sorting by natural order.
Is the Object of MyType not a MyType after using the result of 'context put'?
And is it possible to get a specific error message inside a Drools DMN sort() function?
I removed the access to the field, then the sort() function ran without error. I tried to access the field with 'get value(myObject, "partner") -> didn't work