-
Bug
-
Resolution: Done
-
Major
-
6.2.0.Final
-
None
I declare my events in a DRL that is different from the DRL that contains my rules. I declare my event with @propertyReactive. In my rule I use an @watch annotation. In JBoss BRMS 6.1 / Drools 6.2+, this causes an error when building my KieBase:
java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=rules.drl, line=7, column=0 text=Wrong usage of @Watch annotation on class org.jboss.ddoyle.drools.propreactive.model.Event1 that is not annotated as @PropertyReactive]] at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:418) at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:396)
The interesting thing is that the error only occurs if I give my DRL with my 'declare' a certain name. I.e. if I name it 'a.drl', building the KieBase fails, if I name it 'ab.drl', it succeeds.
A reproducer can be found here: https://github.com/DuncanDoyle/drools-propreactive-kiebase-build-issue
Just run a 'mvn clean test' on the project.