Zeebe DMN Worker : literal expression in Javascript not supported

Hello,

In my DMN file, I have a literal expression in Javascript :

image

When I deploy the DMN file, this is the log I get :

06:51:51.053 [main] WARN org.camunda.dmn.DmnEngine - Failure(Fail to parse file 'test_js.dmn': Failure(Expression language 'javascript' is not supported))

It seems that the DMN Engine worker does not support JS.

Am I missing some setup ? Is there a better way to do this ?

Thank you for your help,

1 Like

According to the DMN-worker README:

The engine comes with a bunch of built-in functions which are defined by the DMN specification. And it allows you to define own functions as FEEL expressions (using the keyword function) or as context entry element.

However, the engine provides also a SPI to add custom functions which are written in Scala / Java. The classes are loaded via Java’s service loader mechanism. Please have a look at the documentation to see how to implement the SPI.

Correct. The worker of the DMN-Scala engine doesn’t support other expression languages. Only FEEL.

In most cases, you should be able to write the same expression in FEEL.

However, if you prefer then you could also use the other DMN worker based on the Camunda DMN engine. This worker supports JavaScript.

Does this help you?

Best regards,
Philipp

Thanks @jwulf and @philipp.ossler for the hint, regex matching works fine with FEEL as showing below in the online DMN simulator:


I also got it to work with de dmn zeebe-worker.

1 Like