[rules-users] determining what field changed
Chris Richmond
crichmond at referentia.com
Wed Sep 16 15:41:23 EDT 2009
Is it possible to determine what fields from an object changed within a
rule.
So I am using this to determine if any DataObject has changed:
//IDENTIFY ANY DATAOBJECT CHANGES
rule "identify any DATAOBJECT"
when
$do : DataObject();
then
System.err.println("ANY DataObject change detected:" + $do);
End
However this also fires when any new DataObject() is injected into the
system and the rules are fired. I would like to be able to only have a rule
fire when an object is first created
Vs. when it is modified and is there a way to detect what values of an
object have changed if I don't explicitly know what fields of DataObject
changed ahead of time?
Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090916/248dffa8/attachment.html
More information about the rules-users
mailing list