JUEL expression error


I have a question, I have defined a sequence flow which has a condition type of expression, with expression being:

${finalApprover.equals(true)} || ${requestCategory.equals("Replacement")}

This returns an error:
Caused by: org.camunda.bpm.engine.ProcessEngineException: condition expression returns non-Boolean: result has class java.lang.String and not java.lang.Boolean

If I use just ${finalApprover.equals(true)} or ${requestCategory.equals("Replacement")} separately then there is no error. But I must check multiple conditions. I understood by reading some JUEL docs, that my code above seems to be correct, but it still produces error.

Is there another way or what is my mistake?

Thanks in advance!


returns the String true || false or whatever the #equals invocation resolve to.

Instead, you could write

${finalApprover.equals(true) || requestCategory.equals("Replacement")}


1 Like

Thanks Thorben!!!

Everything works now fine!

Have a nice weekend,