Created attachment 523875 [details]
Simple test case
Description of problem:
Methods are undefined for classes imported from different package and defined as events.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run the included test case
Rule Compilation error : [Rule name='rule 3']
org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (8:409) : The method setId(int) is undefined for the type OutsideEvent
org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (9:424) : The method setKey(String) is undefined for the type OutsideEvent
org/jboss/qa/brms/entrypoints/Rule_rule_3_0.java (10:448) : The method setValue(String) is undefined for the type OutsideEvent
I was able to reproduce the problem. It is not related to events themselves, but to having an import .* on a given package and then using a "declare" statement for a type in that package.
Just to keep you updated, I have the problem narrowed down and it is related to classpath clashes and problems on classpath resolution when using imports with .*.
Working full time on the solution, just not clear yet how to do it.
Bug fixed and committed.
Marked as not needing a release note as Events and CEP will be supported for the first time in 5.2.0.
Just to clarify, this is *not* related to events. It was a bug when using package imports (e.g., org.drools.test.*) and a declare statement on a class in that package. For instance, a fact declaration would raise the same problem:
@role( fact )
Having said that, I believe this regression was introduced after 5.1.0 was released and since it is fixed now, probably does not require a release note.
Thanks for the clarification, Edson.
I'll leave this marked as no release note needed for the reasons you've stated.
This bug was fixed in BRMS-5.2.0.ER5, marking it verified.