I&#39;ve found that creating objects and facts from DRL-declared classes is<br>easily done in DRL, in RHS code.<br>-W<br><br><div class="gmail_quote">On 9 January 2012 16:06, MarcoMojana <span dir="ltr">&lt;<a href="mailto:marco.mojana@exmachina.ch">marco.mojana@exmachina.ch</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">Hi,<br>
I have declared a fact in a drl file as follows:<br>
<br>
package a.b.c<br>
declare MyFact<br>
        vehicle : Vehicle<br>
end<br>
<br>
The corresponding class file doesn&#39;t exists: it is created on the fly by<br>
drools at runtime. The class name should be a.b.c.MyFact, but the<br>
classloader cannot find it by using:<br>
Class c = Class.forName(&quot;a.b.c.MyFact&quot;);<br>
<br>
Is it possible to do that and how? I don&#39;t want to create the class because<br>
it is used only by rules inside the drl file, but I would like to write a<br>
test case for them.<br>
<br>
Thank you<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
MM<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Instantiate-fact-class-declared-only-in-drl-tp3644780p3644780.html" target="_blank">http://drools.46999.n3.nabble.com/Instantiate-fact-class-declared-only-in-drl-tp3644780p3644780.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</font></span></blockquote></div><br>