[rules-users] Why Using "from" Always Return A New Fact?

Swindells, Thomas TSwindells at nds.com
Wed Jan 19 05:49:46 EST 2011


Drools doesn't know if $p.address.state has changed or not, all it knows is that $p has changed - it has to assume that everything within $p has changed (including all the states).

Thomas

> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at lists.jboss.org] On Behalf Of hyjshanghai
> Sent: 19 January 2011 10:40
> To: rules-users at lists.jboss.org
> Subject: Re: [rules-users] Why Using "from" Always Return A New Fact?
>
>
> Thank you. I understand it now:
> In the 2nd rule:
> modify($p) => evaluate the 2nd rule again => re-iterate $p.address with
> "from", so that Drools engine can know if there is any change in $p.address
> compared with previous evaluation.
>
> Also, the above modify($p) also triggers evaluation of the 1st rule.
>
> Then, why "when the second rule fires, it deactivates the first rule." as
> the document says?
> I think nobody modifies $p.address.state. So the existing activation for the
> 1st rule should still hold. Why the 1st rule is not fired?
> --
> View this message in context: http://drools-java-rules-
> engine.46999.n3.nabble.com/Why-Using-from-Always-Return-A-New-Fact-
> tp2286393p2286492.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************




More information about the rules-users mailing list