<p>There&#39;s now possibility to declare facts in the drl, like:<br></p><p><font face="courier new,monospace">declare Person<br>&nbsp;name: String<br>&nbsp;age: int<br>end</font><br></p><p>My question is how do I instantiate this fact object during runtime? Do I still need to have class <font face="courier new,monospace">Person</font> compiled and existing somewhere in classpath, or there&#39;s a helper class which I can use &quot;fake the fact&quot;, something like:</p>
<p><font face="courier new,monospace">&nbsp; FakeFact person = FakeFact(&quot;Person&quot;);<br>&nbsp; person.setField(&quot;name&quot;, &quot;Oleg&quot;);<br>&nbsp; person.setField(&quot;age&quot;, &quot;42&quot;);<br>&nbsp; session.insert(person);</font></p>
<p>Or there&#39;s another nicer way?<br><br></p><p>Thank you,<br>-Oleg Zenzin<br></p>