Special symbols in expression

Hello there,
I have some strange behaviour in expression calling a method and passing a variable.

Here is the thing. On modeller, I have a service task that calls method from bean and passing a variable previously posted in user task. The variable holds a plain text.

${someService.customMethod(varThatHoldsPlainText)}

I’m getting an error when variable “varThatHoldsPlainText” contains special char ‘$’. Is there a solution to fix this?

I can escape or remove special chars when saving this variable, but is there a faster solution?

Hi @heril.muratovic06,

I believe that it would be much better to rename variables for which $ symbol is used as part of their names and avoid using it with future models.

“$” is not used as part of variable name. It’s used as variable TEXT (content). For example: “This variable cost is 56$”.

varThatHoldsPlainText = “This variable cost is 56$”
Then if I use variable “varThatHoldsPlainText” in expression an error occurred because of existing “$” sign in variable content.