The agent that is responsible for the address change must take care to provide information about what it does. This could be done by creating an UpdateEvent fact referencing the Person fact and indicating the attribute (address). Or a listener reacts to the change and insert the UpdateEvent fact.
Or you follow your "ideally-we-should-have-2" idea. -W On 9 November 2011 09:29, kapokfly <[email protected]> wrote: > Requirement: > > 1) > Rule > When > Person.address.address1 is changed > THEN > > 2) Ideally we should have 2 objects, 1 for the old person instance, the > other for the new person instance so contextually the LHS equals to > oldPerson.address.address1 != newPerson.address.address1. > > A properties change listener might not be the best solution as it might > span > multiple calls and the property change could be done on the web layer which > is out of the JBoss Drools knowledge session. > > Ivan > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-write-Drools-rule-basing-on-a-changed-property-tp3492926p3492926.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
