<div dir="ltr"><br>&nbsp;&nbsp; It is definitively a bug then. Will take a look.<br><br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/10/7 Michal Bali <span dir="ltr">&lt;<a href="mailto:michalbali@gmail.com">michalbali@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Hi Edson,<div><br></div><div>Thanks for the quick reply.</div><div><br></div>
<div>In the example I&#39;ve mentioned there is already such import:</div><div><span style="font-family: -webkit-monospace; font-size: 12px; line-height: 14px; white-space: nowrap;">import&nbsp;org.drools.StockTick;</span><br>

</div><div><br></div><div>BTW, it is a unit test you&#39;ve written :)</div><div><br></div><div>I&#39;ve also tried the fully qualified class name but it throws following exception (this was tested with 5.0.0M2):</div><div>

<div>java.lang.NullPointerException</div><div><span style="white-space: pre;">        </span>at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:420)</div><div class="Ih2E3d"><div><span style="white-space: pre;">        </span>at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:381)</div>

</div><div><span style="white-space: pre;">        </span>at com.dds.adjudication.service.DroolsTestHelper.createRuleBase(DroolsTestHelper.java:119)</div><div><span style="white-space: pre;">        </span>at com.dds.adjudication.service.DroolsTestHelper.getEligibilityRuleBase(DroolsTestHelper.java:81)</div>

<div><span style="white-space: pre;">        </span>at com.dds.adjudication.service.DroolsEligibilityIntegrationTest.setUp(DroolsEligibilityIntegrationTest.java:32)</div><div><span style="white-space: pre;">        </span>at org.jmock.integration.junit3.VerifyingTestCase.runBare(VerifyingTestCase.java:36)</div>
<div class="Ih2E3d">
<div><span style="white-space: pre;">        </span>at junit.framework.TestResult$1.protect(TestResult.java:106)</div><div><span style="white-space: pre;">        </span>at junit.framework.TestResult.runProtected(TestResult.java:124)</div>

<div><span style="white-space: pre;">        </span>at junit.framework.TestResult.run(TestResult.java:109)</div></div><div><span style="white-space: pre;">        </span>at junit.framework.TestCase.run(TestCase.java:120)</div>
<div><span style="white-space: pre;">        </span>at junit.framework.TestSuite.runTest(TestSuite.java:230)</div><div><span style="white-space: pre;">        </span>at junit.framework.TestSuite.run(TestSuite.java:225)</div><div class="Ih2E3d">

<div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)</div><div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)</div>

<div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)</div><div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)</div>

<div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)</div><div><span style="white-space: pre;">        </span>at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)</div>

<div><br></div></div></div><div>Best Regards,</div><div>Michal</div><div><div></div><div class="Wj3C7c"><div><br><br><div class="gmail_quote">On Tue, Oct 7, 2008 at 2:20 AM, Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><br>&nbsp;&nbsp; Oh, forgot to mention, if you don&#39;t want the import, you can also fully qualify the class:<br>

<br>declare your.package.SomeClass<br>&nbsp;&nbsp;&nbsp; @role( event )<br>end<br><br>&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">
2008/10/6 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div dir="ltr"><br>&nbsp;&nbsp; Yes, but in that case you need to tell drools where to find the class... i.e., add an import for it:<br><br>import your.package.SomeClass<br><br>declare SomeClass<br>&nbsp;&nbsp;&nbsp; @role( event )<br>end<br><br>


&nbsp;&nbsp; If it does not work, let me know plz. Since it is new feature, there may still be some corners to polish.<br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/10/6 Michal Bali <span dir="ltr">&lt;<a href="mailto:michalbali@gmail.com" target="_blank">michalbali@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div><div></div><div>
<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" target="_blank">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 title="17264 tirelli">package&nbsp;org.droolsssssss;</span>&nbsp; //this makes sure that <span 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>
<br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>
</div>
</blockquote></div></div></div><div><div></div><div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>


</div></div></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>