[rules-users] Listening to changes on facts

Davide Sottara dsotty at gmail.com
Wed Oct 17 15:02:12 EDT 2012


Ok, 

- For the first scenario a global or a helper class should do the job

- The second scenario would require some rules to match your intended
patterns.. as for the cache
integration, that would be something very interesting. If your investigation
is successful, and if you want,
the community would be happy to see at least a post on the blog about it :)

- Now I'm not 100% sure that meta-rules would be really needed, but anyway..
a meta rule is essentially a rule matching an
org.drools.runtime.rule.Activation, which carries information, among other
things, on the rule and the tuple which triggered it. It is inserted in the
session's WM as the rule becomes active, and retracted when the rule is
fired. In the meantime, you can match and play with it. 
See the details on how to enable it here:

http://blog.athico.com/2011/08/declarative-agenda-and-control-rules.html

Essentially, a meta-rule would not exactly let you know when a fact is
modified, but when a rule that is known to modify a fact is active and ready
to execute.

Davide



--
View this message in context: http://drools.46999.n3.nabble.com/Listening-to-changes-on-facts-tp4020231p4020345.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list