What causes the exception "Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String" ?
Issue
- While validating rules it throws exception whose root cause seem to be the following one.
Unable to Analyse Expression $bookProprerty.initials == 'T' && !isLoanable($bookProprerty.loanerID, $bookProprerty.authorInitials):
[Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String]
[Near : {... !isLoanable ....}]
^
[Line: 39, Column: 8]
How to fix these sorts of issues in rules?
Environment
- Red Hat JBoss BRMS (BRMS)
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.