Beware with the use of the FROM Conditional Element, because if you are
using another fact that doesn't come from the DB and you change them, the
FROM CE will be continuously evaluated causing the execution of tons of
queries multiple times.
My two cents.
Greetings
2011/2/14 Michael Anstis <michael.anstis(a)gmail.com>
You can access Objects from external resources using the
"from" keyword (in
fact the use of this with Hibernate named queries is a documented use-case,
IIRC).
The Objects are not however inserted into WorkingMemory using "from" are
should therefore be time-constant as their properties will not be included
in truth maintenance.
If you require the Objects as Facts in WorkingMemory for the inference
engine to reason with, you can write rules using "from" that insert into
WorkingMemory.
On 14 February 2011 11:27, hyjshanghai <hyjshanghai(a)gmail.com> wrote:
>
> As far as I know, Drools can only reason over facts in the working memory.
> It
> can not directly "select" from RDBMS. You have to load in all data items
> from the database and validate them in memory by Drools.
> --
> View this message in context:
>
http://drools-java-rules-engine.46999.n3.nabble.com/Applying-rules-on-the...
> Sent from the Drools - User mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @
http://www.plugtree.com
- MyJourney @
http://salaboy.wordpress.com
- Co-Founder @
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -