Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-04 Thread Edson Tirelli
Sorry, my mistake. Wolfgang's suggestion works, but you can also simply define type as the key on sales type: declare SalesType type : String @key end Logical insertions always use equality method, even if regular insertions use identity. Edson 2011/1/4 Wolfgang Laun : > > > On 4

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-04 Thread Wolfgang Laun
On 4 January 2011 11:15, Gabor Szokoli wrote: > Hi, > > Purely for educational purposes I am trying to figure out how this > will work when multiple Sale instances share the same "type" string. > > It seems to me that under the default "identity" assertion mode of the > Working Memory, as many Sa

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-04 Thread Gabor Szokoli
Hi, Purely for educational purposes I am trying to figure out how this will work when multiple Sale instances share the same "type" string. It seems to me that under the default "identity" assertion mode of the Working Memory, as many SaleType instances would be maintained as there are unexpired

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-03 Thread Edson Tirelli
rom: rules-users-boun...@lists.jboss.org > [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Gabor Szokoli > Sent: Monday, January 03, 2011 5:31 PM > To: Rules Users List > Subject: Re: [rules-users] Does Drools Fusion support "Group By" clause > ? > > Hi, >

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-03 Thread Wolfgang Laun
You'll have to establish individual String objects to select type. There's two ways to do that. 1. You know all possible type values and insert them as facts. This is the most efficient way. (Perhaps wrap the string into a fact type ItemType{ String type; }.) rule "StoreABC" whe

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-03 Thread Kiran Ananthpur Bacche (kbacche)
s Users List Subject: Re: [rules-users] Does Drools Fusion support "Group By" clause ? Hi, 2011/1/3 Kiran Ananthpur Bacche (kbacche) : > I want the rule to fire successfully only when the TotalSalesAmount for > _any_ given type exceeds 100. I've never used "accumulate

Re: [rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-03 Thread Gabor Szokoli
Hi, 2011/1/3 Kiran Ananthpur Bacche (kbacche) : > I want the rule to fire successfully only when the TotalSalesAmount for > _any_ given type exceeds 100. I've never used "accumulate" myself, so I looked it up in the manual, and there's an example that's exactly what you want :-) (just substitute

[rules-users] Does Drools Fusion support "Group By" clause ?

2011-01-03 Thread Kiran Ananthpur Bacche (kbacche)
Hi, I have a event processing rule as follows declare Sale @role(event) end rule "StoreABC" when #conditions Number( $TotalSalesAmount : intValue, intValue > 100)