<p>There's now possibility to declare facts in the drl, like:<br></p><p><font face="courier new,monospace">declare Person<br> name: String<br> 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's a helper class which I can use "fake the fact", something like:</p>
<p><font face="courier new,monospace"> FakeFact person = FakeFact("Person");<br> person.setField("name", "Oleg");<br> person.setField("age", "42");<br> session.insert(person);</font></p>
<p>Or there's another nicer way?<br><br></p><p>Thank you,<br>-Oleg Zenzin<br></p>