I am extending the Zeebe DMN Worker to include the custom function decr. I have a created a file named org.camunda.feel.context.CustomFunctionProvider with the following content:
io.zeebe.dmn.CustomJavaFunctionProvider
CustomJavaFunctionProvider is the custom class declared in the package io.zeebe.dmn.
I get this error after execution:
failed to evaluate expression ‘{season: “Winter”,guestCount: decr(4),guestsWithChildren: true}’: no function found with name ‘decr’ and 1 parameters
Currently, this feature is not supported by the worker. The worker uses the Camunda DMN engine which has a slightly different way to register custom functions. But the worker doesn’t provide an option to register the functions like described.
As a workaround, you could try to set the expression language to feel-scala. This forces the DMN engine to call the FEEL engine as a script language.
Please create a new feature request in the worker repo.