[rules-users] StatefulKnowledgeSession insert Fact using Dynamic option ?

Remi Barraquand nospam at barraquand.com
Thu Dec 11 15:10:39 EST 2008


Hi everyone,

Well i'm trying to upgrade my project to use the last Drools 5.0 API
(5.0.0.M4) and i don't understand something, where is the insert(Object
object, boolean dynamic) method gone ?

In the project i'm working on, one important aspect is to be able to change
the properties of a fact both from Java side and from Drools side. That is
calling 
   myFact.setPropertyName(theValue); 
on the java side should modify the fact in the working memory and of course
doing 
   modify( $myFact ) { 
      property = theValue
   }
in a rule should modify the value of that fact on the java side.

In the 4.0.7 version of drools i was using firePropertyChange in each setter
to propagate the change, and i inserted each fact in the working memory
using the insert(myFact, true) method. However in the new 5.0 API this
function is gone from the StatefulKnowledgeSession class
(WorkingMemoryEntryPoint).

How could i use dynamic fact using Drools 5.0 ? what should i need to
change, or what i did i miss ? :)

Thanks a lot for any help.

Rémi

-----
________________________________________

Rémi Barraquand, PhD I.N.P.G

Projet PRIMA - Laboratoire  LIG

INRIA Grenoble Rhones-Alpes Research Centre

655 Ave de l'Europe

38330 Montbonnot, France


   http://barraquand.fr Barraquand 
   http://bois-chauffage.fr Bois de Chauffage 
   http://ecoboisenergie.fr Eco Bois Energie 
   http://venteboisdechauffage.com Vente Bois de Chauffage 

-- 
View this message in context: http://www.nabble.com/StatefulKnowledgeSession-insert-Fact-using-Dynamic-option---tp20963645p20963645.html
Sent from the drools - user mailing list archive at Nabble.com.





More information about the rules-users mailing list