import org.drools.spi.KnowledgeHelper;<br><br>function void ins( KnowledgeHelper k, Object o ){<br>  k.insert(o);<br>}<br><br><br><div class="gmail_quote">On 11 March 2011 04:26, groovenarula <span dir="ltr">&lt;<a href="mailto:gnarula1@la-z-boy.com">gnarula1@la-z-boy.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;">Hello all,<br>
<br>
As the title states, I need to create new facts and insert them into working<br>
memory from a function. Is it possible to do that ? I tried to create a<br>
function with &#39;KnowledgeHelper&#39; as a parameter and my rule file failed to<br>
compile. Then I even tried to reference &#39;drools&#39; instance variable from<br>
within a function and that failed to compile too.<br>
<br>
So if this is possible, I&#39;d appreciate it if someone can shed some light on<br>
this !<br>
<br>
Thanks in advance,<br>
G<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/is-is-possible-to-insert-facts-into-working-memory-from-functions-tp2663433p2663433.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/is-is-possible-to-insert-facts-into-working-memory-from-functions-tp2663433p2663433.html</a><br>

Sent from the Drools - User 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></blockquote></div><br>