PS. I was a bit too quick with my email; that is not to say that I
don't suspect there to be a problem.
It appears to depend on whether the left-hand side of the matches
clause is a field or a Java expression.
For instance:
f : Fact( w matches "\." )
does not require escaping in accordance with the documentation, but if
I match on a different expression:
f : Fact(w.somebeanproperty matches "\\.")
escaping the "\" becomes required.
- Godmar
On 9/25/07, Godmar Back <godmar(a)gmail.com> wrote:
The documentation states that '\' occurring in matches
clauses do not
need escaping. However, unescaped '\' cause this error message when
compiling the .drl file:
Exception in thread "main" org.drools.rule.InvalidRulePackage: Unable
to determine the used declarations : [Rule name=Apply XML Descriptor,
agendaGroup=MAIN, salience=0, no-loop=false]
at org.drools.rule.Package.checkValidity(Package.java:419)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:292)
Escaping the '\' as is customary in Java makes the code work.
- Godmar