[rules-users] Declared model and drools.agent.newInstance

Esteban Aliverti esteban.aliverti at gmail.com
Tue Feb 21 06:47:42 EST 2012


There is a known bug with incremental kbase changes (what happens
when drools.agent.newInstance=false) and declared types. Sometime ago
someone mentioned a possible workaround. Try to search in the mailing list.

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Tue, Feb 21, 2012 at 12:25 PM, Juanker Atina <juankera at gmail.com> wrote:

> Hi there,
>
> I want to work with declared facts, inside drl file, but when i set drools.agent.newInstance
> property to false, it seems that drools won't work with this specific fact.
>
>
> My code stops working when i put this two lines,
>
> KnowledgeAgentConfiguration aconf =
> KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
> aconf.setProperty("drools.agent.newInstance", "false");
>
> And it works fine when i remove these lines.
>
>
> So, I've read that this property is related to new instances of
> KnowledgeBase when resources changes...
>
> c&p from: http://grepcode.com/file/repository.jboss.org/maven2/org.drools/
> drools-api/5.0.0.M4/org/drools/agent/KnowledgeAgentFactory.java
>
> *aconf.setProperty( "drools.agent.newInstance",
>                           "true" ); // resource changes results in a new
> instance of the KnowledgeBase being built,
>                                     // this cannot currently be set to
> false for incremental building*
>
> Hence, why is this property changing the behaviour of the rules?
>
> (See this thread too,
> http://drools.46999.n3.nabble.com/rules-users-Truth-maintenance-and-RHS-variables-tt3722632.html#a3731857
> )
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120221/bdddbfa1/attachment.html 


More information about the rules-users mailing list