You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
FEEL doesn't have strict error handling. An expression may evaluate to null (and continue). For example, if the types don't match or a function is called with the wrong arguments.
For example:
"order-" + 123
// WARN org.camunda.feel.FeelEngine - Suppressed failure: expected String but found 'ValNumber(123)'
// should be "order-" + string(123)
date("01-01-2021")
// null - wrong format
// should be date("2021-01-01")
In some cases, you want to have different behavior. For example, collect and report all (suppressed) failures. This may help to identify failures and to correct the expression.
Describe the solution you'd like
Have the option to customize the error handling. For example, using an SPI like for the value mapper and the function provider.
A solution could be to give control of the error handling to the caller of the API.
If the engine can't evaluate a part of the expression successfully then it collects the failure and continues the evaluation with null. It may return null as the result of the evaluation and exposes the collected failures (i.e. failure message + failure type).
Based on the collected failures, the caller can decide if the evaluation was successful or not.
Is your feature request related to a problem? Please describe.
FEEL doesn't have strict error handling. An expression may evaluate to
null
(and continue). For example, if the types don't match or a function is called with the wrong arguments.For example:
In some cases, you want to have different behavior. For example, collect and report all (suppressed) failures. This may help to identify failures and to correct the expression.
Describe the solution you'd like
Have the option to customize the error handling.
For example, using an SPI like for the value mapper and the function provider.A solution could be to give control of the error handling to the caller of the API.
If the engine can't evaluate a part of the expression successfully then it collects the failure and continues the evaluation with
null
. It may returnnull
as the result of the evaluation and exposes the collected failures (i.e. failure message + failure type).Based on the collected failures, the caller can decide if the evaluation was successful or not.
Related issues
Kind of related to #259
The text was updated successfully, but these errors were encountered: