How to escape characters (e.g., ',') in DMN / FEEL

I’m using Camunda Modeler on a DMN Table and for one of my rules (rows), the cell for my employeeType input variable needs to match a string that contains a comma (,) in it.

Camunda Modeler doesn’t complain (or even show what is going on) but when I execute the DMN table, the Camunda engine/FEEL thinks I mean “Manager”, “Employee” (one OR the other) when I actually mean literally the string “Manager, Employee” –a single string that contains a comma.

How can I escape the comma? I’ve tried “Manager{{‘,’}} Employee”, “Manager, Employee”, and using encodings like “Manager, Employee”.

I can work around it, of course by setting it to something like “Manager & Employee” but that would require me to change upstream dependencies and I would like to avoid this.

Thank you,
Daniel S.

Hi @segura2794 - the backslash (\) is the escape character, but you should not need to escape a comma. The characters that need to be escaped in FEEL are (I think): \, ", ', \n and \r.

My first guess is perhaps the space after the comma is causing a mismatch (for instance, your rule is matching Manager, Employee but the variable has the value Manager,Employee).

Can you share your DMN definition, or a screenshot of it, and a sample input?

Hey Nathan,

Thank you for your detailed response. I could have sworn it was not working with the comma but today I tried again and it magically worked (I’m not even mad)…

But like you said: I don’t need to escape comma (,) within double quotes.

Thanks again,
Daniel S.

1 Like