Re: [rules-users] Drool Function error

2012-03-01 Thread shawn
Thank you~ -- View this message in context: http://drools.46999.n3.nabble.com/Drool-Function-error-tp3788965p3789874.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https

Re: [rules-users] Drool Function error

2012-02-29 Thread Davide Sottara
You can get a reference to the KnowledgeHelper in the RHS of a rule simply using the variable-like "drools". It exposes the WorkingMemory methods you need. You can then pass it to your function: function void x( ..., KnowledgeHelper kh ) { ... kh.insertLogical(...) } rule "y" when then

[rules-users] Drool Function error

2012-02-29 Thread shawn
I write a function in drool, but it always has error. The error is :The method insertLogical(PreCondition) is undefined for the type InsertPreCondition Is it because insertLogical must be used in RHS? Is there any way to use insertLogical in function or implement the function in RHS? code: import