<div dir="ltr">Hi,<br><br>Should it be possible to declare an event role to an existing type that is outside of the current rule package?<br><br>Example:<br>In the following file:<br><a href="http://fisheye.jboss.org/browse/JBossRules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_EntryPoint.drl?r=19705">http://fisheye.jboss.org/browse/JBossRules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_EntryPoint.drl?r=19705</a><br>
<br>change the first line to:<br><span class="annLine" title="17264 tirelli">package&nbsp;org.droolsssssss;</span>&nbsp; //this makes sure that <span class="annLine" title="19705 tirelli">StockTick is in different package<br><br>now, the test org.drools.integrationtests.StreamsTest.testEventAssertion() throws following exception:<br>
<br>org.drools.RuntimeDroolsException: unable to resolve Type Declaration class &#39;StockTick&#39;<br>&nbsp;&nbsp;&nbsp; at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:484)<br>&nbsp;&nbsp;&nbsp; at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:381)<br>
&nbsp;&nbsp;&nbsp; at org.drools.integrationtests.StreamsTest.loadRuleBase(StreamsTest.java:93)<br>&nbsp;&nbsp;&nbsp; at org.drools.integrationtests.StreamsTest.testEventAssertion(StreamsTest.java:101)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:597)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.runTest(TestCase.java:154)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.runBare(TestCase.java:127)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestResult$1.protect(TestResult.java:106)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestResult.run(TestResult.java:109)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.run(TestCase.java:118)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>&nbsp;&nbsp;&nbsp; at junit.framework.TestSuite.run(TestSuite.java:203)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)<br>&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br>&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br>&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br>
<br>Best Regards,<br>Michal<br></span></div>