[rules-users] Having problems with traits in 5.4.0beta2

Greg Barton greg_barton at yahoo.com
Sun Mar 11 14:23:44 EDT 2012


It's not, but can easily be.  I just tried that, though, and the same exception happened.

DRL attached.  It's an old attempt to update the classic monkeys and bananas example to make it a bit more interesting: wandering monkeys, stacking blocks, a bit of world physics, stuff like that.  I haven't touched it for several years and wanted to update it with new drools features for a presentation I'm doing on Tuesday.  I was able to use the new parser features to eliminate a ton of evals, and would like to put traits and propSpecific features in. 

And just to confuse things a bit I have a question about propSpecific. :)  Is it possible to annotate a method to indicate that it changes properties on a different object type other than itself?  Take the "monkey_finds_block" rule as an example.  The Monkey.setHolding() method modifies the thing that's being held.  It would be great if I could annotate  Monkey.setHolding() to indicate that it not only modifies Monkey.holding, but also Entity.location and Entity.holds.

--- On Sun, 3/11/12, Davide Sottara <dsotty at gmail.com> wrote:

> From: Davide Sottara <dsotty at gmail.com>
> Subject: Re: [rules-users] Having problems with traits in 5.4.0beta2
> To: rules-users at lists.jboss.org
> Date: Sunday, March 11, 2012, 11:58 AM
> Is HungryMoneky an interface you have
> outside the DRL?
> Can you send me the full DRL anyway?
> Thanks
> Davide
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/rules-users-Having-problems-with-traits-in-5-4-0beta2-tp3816181p3816923.html
> Sent from the Drools: User forum mailing list archive at
> Nabble.com.
> _______________________________________________
> 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: MonkeysAndBananas.drl
Type: application/octet-stream
Size: 6285 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20120311/2fa30c39/attachment.obj 


More information about the rules-users mailing list