Shadow proxies are no longer needed in drools 5.0
Does that mean, in order to reflect Fact changes that happened outside the
engine (java side), we need to call explicitly:
session.update(FactHandle handle,Object object)
instead of putting firepropertyChange inside each setter ? since inserting
fact in dynamic mode is no longer supported.
What is the best approach when fact properties are changing really often on
the java side ?
thanks, Rémi
Remi Barraquand wrote:
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
--
View this message in context:
http://www.nabble.com/StatefulKnowledgeSession-insert-Fact-using-Dynamic-...
Sent from the drools - user mailing list archive at
Nabble.com.