Bug 739638

Summary: Events have undefined methods
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Tomas Schlosser <tschloss>
Component: BRE (Expert, Fusion)Assignee: Nobody <nobody>
Status: VERIFIED --- QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: BRMS 5.2.0.GACC: rzhang
Target Milestone: ---   
Target Release: BRMS 5.2.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Simple test case none

Description Tomas Schlosser 2011-09-19 17:12:21 UTC
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):
BRMS 5.2.0.ER4

How reproducible:
every time

Steps to Reproduce:
1. run the included test case
  
Actual results:
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


	at org.jboss.qa.brms.entrypoints.EntryPointsTest.main(EntryPointsTest.java:27)

Expected results:


Additional info:

Comment 1 Edson Tirelli 2011-09-19 20:01:52 UTC
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.

Investigating.

Comment 2 Edson Tirelli 2011-09-20 13:27:48 UTC
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.

Comment 3 Edson Tirelli 2011-09-20 15:33:44 UTC
Bug fixed and committed. 

https://github.com/droolsjbpm/drools/commit/08ce9dae3054ddc0ebb53c943d5dc58441e91bf4

Comment 4 lcarlon 2011-09-21 03:56:39 UTC
Marked as not needing a release note as Events and CEP will be supported for the first time in 5.2.0.

Comment 5 Edson Tirelli 2011-09-21 12:10:41 UTC
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:

declare MyClass
    @role( fact )
end

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.

Comment 6 lcarlon 2011-09-21 22:36:20 UTC
Thanks for the clarification, Edson.

I'll leave this marked as no release note needed for the reasons you've stated.

Comment 7 Tomas Schlosser 2011-09-30 08:07:26 UTC
This bug was fixed in BRMS-5.2.0.ER5, marking it verified.