Anstis, Michael (M.) wrote:
I *seem* to be able to still use "update" in the RHS with
4.0.5.
yes update has not been removed, it's still part of the main api. If we
removed it you would have no way to notify the engine of changes from
outside the engine, and I expect some people might be upset if their
drls broke if we removed it from consequences :)
Perhaps I've got my binaries mixed up. If I get the chance
I'll do a clean
install.
Thanks for the clarification - I don't want to end up confusing matters with
my "help" ;-)
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
Sent: 11 April 2008 12:51
To: christine(a)christine.nl; Rules Users List
Subject: Re: [rules-users] modify()
X10 wrote:
> Hi,
> I take it the "modify()" that's in the manual got replaced by
> "update()"?
>
>
The meanings have changed, but both exist to some degree. modify() is a
specail keyword used in the java/mvel consequence. Inside a consequence
it is the preferred way modify facts, so that the engine is notified.
Outside of consequence, in normal Java, one an object has been changed
you need to notify the engine, this is done via the update() method,
which tells the engine the fact has been updated.
The main difference is that update( handle ) only takes a single
parameter where as modify( object ) { field1 = value1, field2 = value2 }
takes key/value pair comma separated list of setters. the language used
to apply those setters is dependant on whether you are using the mvel or
java dialect.
Mark
> Christine
>
> _______________________________________________
> 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
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users