[rules-users] modify()

Anstis, Michael (M.) manstis1 at ford.com
Fri Apr 11 11:17:56 EDT 2008


I *seem* to be able to still use "update" in the RHS with 4.0.5.

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 at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Mark Proctor
Sent: 11 April 2008 12:51
To: christine at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>   

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7206 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080411/33441093/attachment.bin 


More information about the rules-users mailing list