Re: [rules-users] is is possible to insert facts into working memory from functions ?

2011-03-11 Thread groovenarula
Duh !!! Of course - I forgot the import statement. For some reason I thought
KnowledgeHelper would already be imported.

Thanks for your help once again W !

--
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/is-is-possible-to-insert-facts-into-working-memory-from-functions-tp2663433p2664731.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] is is possible to insert facts into working memory from functions ?

2011-03-10 Thread Wolfgang Laun
import org.drools.spi.KnowledgeHelper;

function void ins( KnowledgeHelper k, Object o ){
  k.insert(o);
}


On 11 March 2011 04:26, groovenarula  wrote:

> Hello all,
>
> As the title states, I need to create new facts and insert them into
> working
> memory from a function. Is it possible to do that ? I tried to create a
> function with 'KnowledgeHelper' as a parameter and my rule file failed to
> compile. Then I even tried to reference 'drools' instance variable from
> within a function and that failed to compile too.
>
> So if this is possible, I'd appreciate it if someone can shed some light on
> this !
>
> Thanks in advance,
> G
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/is-is-possible-to-insert-facts-into-working-memory-from-functions-tp2663433p2663433.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] is is possible to insert facts into working memory from functions ?

2011-03-10 Thread groovenarula
Hello all,

As the title states, I need to create new facts and insert them into working
memory from a function. Is it possible to do that ? I tried to create a
function with 'KnowledgeHelper' as a parameter and my rule file failed to
compile. Then I even tried to reference 'drools' instance variable from
within a function and that failed to compile too. 

So if this is possible, I'd appreciate it if someone can shed some light on
this !

Thanks in advance,
G

--
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/is-is-possible-to-insert-facts-into-working-memory-from-functions-tp2663433p2663433.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users