Re: [rules-users] Creating objects in WHEN clause

2009-03-03 Thread David Boaz
x27;t changed (i.e. every time the condition >> is >> encountered) because drools has no way of knowing if they've changed or >> not. >> >> So, after this long winded spiel, here's my suggestion: get the rule(s) >> to >> work u

Re: [rules-users] Creating objects in WHEN clause

2009-03-02 Thread Greg Barton
ssion would be. I can think of some hacks, but would rather not lead you down a garden path. :) Dev d00ds, any comment? --- On Sun, 3/1/09, David Boaz wrote: > From: David Boaz > Subject: Re: [rules-users] Creating objects in WHEN clause > To: rules-users@lists.jboss.org > Date: Sund

Re: [rules-users] Creating objects in WHEN clause

2009-03-02 Thread Greg Barton
Ah, I thought the LHS was parsed into mvel by default. OK, my bad. --- On Sun, 3/1/09, Edson Tirelli wrote: > From: Edson Tirelli > Subject: Re: [rules-users] Creating objects in WHEN clause > To: greg_bar...@yahoo.com > Date: Sunday, March 1, 2009, 6:19 PM > Hold on. :) We ar

Re: [rules-users] Creating objects in WHEN clause

2009-03-01 Thread Greg Barton
rs for Comparables is an mvel feature. --- On Sun, 3/1/09, Edson Tirelli wrote: > From: Edson Tirelli > Subject: Re: [rules-users] Creating objects in WHEN clause > To: greg_bar...@yahoo.com, "Rules Users List" > Date: Sunday, March 1, 2009, 12:46 PM > Just a comment: > &

Re: [rules-users] Creating objects in WHEN clause

2009-03-01 Thread Edson Tirelli
en if they haven't changed (i.e. every time the condition is > encountered) because drools has no way of knowing if they've changed or not. > > So, after this long winded spiel, here's my suggestion: get the rule(s) to > work using "from" but also try insertin

Re: [rules-users] Creating objects in WHEN clause

2009-03-01 Thread David Boaz
tFocus("whatever_your_next_group_is"); > end > > --- On Wed, 2/25/09, Mauricio Salatino wrote: > >> From: Mauricio Salatino >> Subject: Re: [rules-users] Creating objects in WHEN clause >> To: "Rules Users List" >> Date: Wednesday, February 25

Re: [rules-users] Creating objects in WHEN clause

2009-02-26 Thread Greg Barton
--- On Thu, 2/26/09, David Boaz wrote: > My Quantity objects are immutable value objects. just like > the String literal "abc", or a Date. My rule should behave > exactly like Person(name == "abc") You should look into defining a domain specific language, as has been suggested earlier. > Ca

Re: [rules-users] Creating objects in WHEN clause

2009-02-26 Thread David Boaz
if > they've changed or not. > > So, after this long winded spiel, here's my suggestion: get the rule(s) to > work using "from" but also try inserting the Quantity object in working > memory. If you're processing enough data with the rules you will notic

Re: [rules-users] Creating objects in WHEN clause

2009-02-26 Thread Greg Barton
g if they've changed or not. So, after this long winded spiel, here's my suggestion: get the rule(s) to work using "from" but also try inserting the Quantity object in working memory. If you're processing enough data with the rules you will notice a difference. --- O

Re: [rules-users] Creating objects in WHEN clause

2009-02-26 Thread David Boaz
> knowledge engineer. There are many complexities to consider when > authoring rules. If a domain expert is stymied by something as simple as > initializing the working memory properly they're going to have a steep > learning curve. > > --- On Wed, 2/25/09, David Boaz wrote: &

Re: [rules-users] Creating objects in WHEN clause

2009-02-25 Thread Greg Barton
en authoring rules. If a domain expert is stymied by something as simple as initializing the working memory properly they're going to have a steep learning curve. --- On Wed, 2/25/09, David Boaz wrote: > From: David Boaz > Subject: Re: [rules-users] Creating objects in WHEN clau

Re: [rules-users] Creating objects in WHEN clause

2009-02-25 Thread David Sinclair
t; or some such) and set focus to > that > > group when starting. > > > > rule > > agenda-group "initialization" > > no-loop true > > when > > //No condition > > then > > insert(new Quantity("m", 2)); > > drools.se

Re: [rules-users] Creating objects in WHEN clause

2009-02-25 Thread David Boaz
_your_next_group_is"); > end > > --- On Wed, 2/25/09, Mauricio Salatino wrote: > >> From: Mauricio Salatino >> Subject: Re: [rules-users] Creating objects in WHEN clause >> To: "Rules Users List" >> Date: Wednesday, February 25, 2009, 11:40 A

Re: [rules-users] Creating objects in WHEN clause

2009-02-25 Thread Greg Barton
whatever_your_next_group_is"); end --- On Wed, 2/25/09, Mauricio Salatino wrote: > From: Mauricio Salatino > Subject: Re: [rules-users] Creating objects in WHEN clause > To: "Rules Users List" > Date: Wednesday, February 25, 2009, 11:40 AM > How about : > WHE

Re: [rules-users] Creating objects in WHEN clause

2009-02-25 Thread Mauricio Salatino
How about : WHEN $quantity: Quantity(value == 2, unit == "m") $Person($height == $quantity:) then ... On Wed, Feb 25, 2009 at 2:27 PM, David Boaz wrote: > > In my application, we often compare the fact's field values against a known > object. For example: > WHEN person(height> new Quantity(2,

[rules-users] Creating objects in WHEN clause

2009-02-25 Thread David Boaz
In my application, we often compare the fact's field values against a known object. For example: WHEN person(height> new Quantity(2, "m")) // the height is greater than 2 meters. will DROOLS create a "singleton" Quantity object, or will it create one object for each fact evaluation? We consider u