<div>Hi guys,</div><div><br></div><div> we are currently working with Drools Fusion in order to build a complex event processing solution. We've modelled our events using and object (Event) and this object is shared with everyone that needs to publish and event. </div>
<div><br></div><div> Our scenario goes this way</div><div><br></div><div>1) Our shared class, located in <b>ar.com.fluxit.Event</b></div><div><br></div><div>2) An example of our cep rules declared in package <b>rules.flux</b></div>
<div><br></div><div> package <b>rules.flux</b></div><div><div><br></div><div> import <b>ar.com.fluxit.Event;</b></div><div><br></div><div> declare <b>Event</b></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>@role (event)</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>@expires(1m)</div><div> end</div><div><br></div><div><div> rule "hello world"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>when</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span> $event:Event( eventName == "Hello World") from entry-point "<b>rules.flux</b>"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>then</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span> System.out.println("Hello world");</div><div> end</div></div><div><br></div><div><div><br></div></div><div>3) When we try to insert a <b>ar.com.fluxit.Event </b>as a fact in entry point "rules.flux" Drools Fusion throws a NullPointerException. If you read Drools Expert documentation (<a href="http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3661">http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3661</a> - </div>
<h3 class="title" style="color:rgb(74,93,117);line-height:20px;margin-top:0em;font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;padding-top:0em;padding-bottom:0em;text-align:justify"><a id="d0e3661"><font size="2" style="font-weight:normal">Accessing Declared Types from the Application Code) you find this paragraph:</font></a></h3>
<div><a id="d0e3661" style="color:rgb(51,51,51);font-family:'Lucida Grande',Geneva,Verdana,Arial,sans-serif;font-size:12px;line-height:18px;text-align:justify">"The first important thing to realize is that a declared fact will belong to the package where it was declared. So, for instance, in the example below, <code class="code" style="font-size:0.9em;font-family:courrier,monospace;white-space:nowrap">Person</code> will belong to the <code class="code" style="font-size:0.9em;font-family:courrier,monospace;white-space:nowrap">org.drools.examples</code> package, and so the fully qualified name of the generated class will be <code class="code" style="font-size:0.9em;font-family:courrier,monospace;white-space:nowrap">org.drools.examples.Person</code>."</a></div>
<div><br></div><div>When we change package declaration to <b>package ar.com.fluxit </b>everything works like a charm. But in our cep scenario we need that our ar.com.fluxit.Event object to be user by all rules declared in any package. </div>
<div><br></div><div>So, there goes the question. There is a workaround for this? This is a bug? </div><div><br></div><div>Any help would be very appreciated</div><div><br></div><div><br></div><div>Cheers</div><div><br clear="all">
<div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:medium;border-collapse:collapse"><div style="font-size:13px;margin-top:5px;margin-right:15px;margin-bottom:5px;margin-left:15px;padding-bottom:20px">
<div>Joaquín Díaz Vélez<br><br>Flux IT SA<br>Calle 9 N° 865 - Paseo La Panadería - Planta Alta<div>La Plata - Buenos Aires - Argentina<br></div>Teléfono (+54) <span style="font-family:arial;font-size:small;border-collapse:separate">221 553 2980</span> int 306</div>
<div><div>Móvil (+54) 9221 5863322</div></div></div></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"> <a href="http://www.fluxit.com.ar" style="color:rgb(42,93,176)" target="_blank">www.fluxit.com.ar</a></span><span style="font-family:arial,sans-serif;font-size:medium;border-collapse:collapse"><div style="font-size:13px;margin-top:5px;margin-right:15px;margin-bottom:5px;margin-left:15px;padding-bottom:20px">
<div><br></div></div><div style="font-size:13px;margin-top:5px;margin-right:15px;margin-bottom:15px;margin-left:15px;clear:both"></div><div style="background-color:rgb(247,247,247);padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;width:auto;background-repeat:initial initial">
</div><div style="font-size:13px;background-color:rgb(247,247,247);padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;width:auto;background-repeat:initial initial">
</div></span><br>
</div></div>