not without passing in the KnowledgeHelper into the function.
So you can do this:
rule "test rule"
when
something
then
callfunc(drools, someobj)
end
function void callfunc(KnowledgeHelper drools, SomeObject someobj)
....
etc...
"drools" is the implicit "knowledge helper" that exists for things like
this, it is automatically injected into the consequence, but NOT into
functions.
On 11/25/06, Ramesh Bhaskar <[EMAIL PROTECTED]> wrote:
Hi,
Is it possible to do an assert(Object) in a function within a rule
file? Something like
rule "test rule"
when
something
then
callfunc(someobj)
end
function void callfunc(obj someobj){
//do some processing here
assert(newobject);
}
Thanks
Ramesh