Re: [rules-users] Mapping fields of all theses facts takes too much times

2013-04-16 Thread maunakea
I sounds like your business objects will have dependencies and that could be
the reason you are not able to import them into Guvnor. Have you tried
importing all those dependencies as well? Using interfaces as the fact model
for such business objects is a great idea - this is exactly the pattern I am
using and works fine with Drools. I use interfaces and abstract classes for
fact models. This also allows for creating mock objects to create your test
scenarios in Guvnor without dragging in all dependencies to DBs, services,
etc. Then at runtime, you assert your actual BOs that implement these
interfaces and rules will work correctly with them.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Mapping-fields-of-all-theses-facts-takes-too-much-times-tp4023358p4023360.html
Sent from the Drools: User forum 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] Mapping fields of all theses facts takes too much times

2013-04-16 Thread ronan.quintin
Hello / Bonjour

I recently updated my version of Drools from 3 to the 5.4 Final. My drools
integration in version 3 intend to directly insert (or more precisely
"assert") our business objects to working session. Our *b*usiness *o*bjects
had and still have some getters which directly performs SQL request. 
Our current problem is that with a 5.4 declarative model we have to map all
fields from our bo model to the declarative model. But we have a lot of BO
(over 3K) which all have to be inserted to the session, so a lot of SQL
queries are performed which increases (a lot) the execution time.
That's why i wondered if there isn't any way to directy insert our BO into
the session using the Guvnor's POJO model. It's seems that guvnor refuse to
directly take our jar, but maybe there is an option which makes it accept
any jar.
Anyway i think that we can generate a jar which contains interfaces of all
BO, and then directly insert BO into the session, but i'm not sure of Drools
behaviour.

I'm perfectly aware that it's quite ugly, and if you have any other idea to
perform a "lazy loading direclty from database", i'l take it.


Regards / Cordialement



--
View this message in context: 
http://drools.46999.n3.nabble.com/Mapping-fields-of-all-theses-facts-takes-too-much-times-tp4023358.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users