[rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread KDR
Hi, ta very much everyone for the help so far. Another question - how to sort by number of matches please? Say I have objects A, B, C and D and rules 1 to 5. Each object can match each rule independently e.g. A can match rule 1 and 2, B might match all rules 1 to 5, C might match none, D rules

Re: [rules-users] How to create nested rules in Drool Guvnor

2009-08-19 Thread Marc Dzaebel
Michael Rhoden wrote: You can do this using the extends keyword in your rule. You can't use extends in the rule header. -- View this message in context: http://www.nabble.com/How-to-create-nested-rules-in-Drool-Guvnor-tp24943230p25043217.html Sent from the drools - user mailing list

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread David Sinclair
Take a look at the *AgendaEventListener*. It allows you to get callbacks for when a rule has fired. This would allow you to keep track of which rules fire along with the objects that caused it to fire. On Wed, Aug 19, 2009 at 4:27 AM, KDR dr.sopr...@neverbox.com wrote: Hi, ta very much

Re: [rules-users] not able to debug drools flow

2009-08-19 Thread Maximiliano Batelli
Hello I have the same problem when debuging rules using eclipse 3.5, drools 5.0 and jdk 1.6. I downgraded to eclipse 3.4 and worked for me. Is there a solution to let me debug using eclipse 3.5? Thanks Max Hi, I`m experiencing the same problems as Vishal. I am using Eclipse 3.5 and newest

Re: [rules-users] Collect from

2009-08-19 Thread Edson Tirelli
Remember that collect is a simplified form of accumulate. So when you can't achieve what you want with collect, first thing you should look for is accumulate. $list : List() from accumulate( $foo : Foo( ) and not Bar( id == $foo.id ), collectList( $foo ) ) Please note that

Re: [rules-users] Is emptieness supported in Drools 5 (LHS)

2009-08-19 Thread Edson Tirelli
Sometimes this is indeed not clear, so I will try to explain here. Drools uses MVEL to resolve some expressions and semantic code. Although we would like to make it 100% compatible and enable it to use mvel everywhere, that is easier said than done (but we do have someone working on that).

Re: [rules-users] Is emptieness supported in Drools 5 (LHS)

2009-08-19 Thread Macon Pegram
Edson, Thanks for clarifying this. I appreciate it. Macon 2009/8/19 Edson Tirelli tire...@post.com Sometimes this is indeed not clear, so I will try to explain here. Drools uses MVEL to resolve some expressions and semantic code. Although we would like to make it 100% compatible and

Re: [rules-users] Unique events / facts in working memory

2009-08-19 Thread Edson Tirelli
Greg is right if you want to keep it just using expert features. Now if you model your Singleton as an event, you could use the timestamp instead of create a specific attribute for that: oldSingleton : Singleton( $id : id ) newSingleton : Singleton( id == $id,

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread KDR
Thank you Dave. I had a look, but it seems I'd still have to track it and process the results in Java rather than using rules, so I guess I'll stick with my original Java solution. Unless there's some way to track it in Drools? Cheers dave sinclair wrote: Take a look at the

Re: [rules-users] Collecting / sorting by the number of matches

2009-08-19 Thread David Sinclair
Just remember that doing it this way alleviates the author of the rules from having to add that book keeping when creating new rules. This may not be a *rule based* solution, but it is a *Drools* solution :) On Wed, Aug 19, 2009 at 10:42 AM, KDR dr.sopr...@neverbox.com wrote: Thank you Dave. I

Re: [rules-users] Maps in Drools

2009-08-19 Thread KDR
Thanks again Edson. I'd just used a String object to try a simple test but of course your example makes a lot more sense. And thanks also for clarifying that there's full syntax support in the latest mvel jar version. I know this is a Drools rather Java list but as I'm new to both, may I ask

[rules-users] Extending the validation of rules functionality in Guvnor

2009-08-19 Thread Premkumar Stephen
Hello everyone, Currently, the validate functionality ensures that rules have proper syntax. it is possible to extend this functionality so that business use cases might also be validated? Is there an API/examples to do that. For eg, in our domain, an object X can be evaluated for 3 criteria (

Re: [rules-users] Maps in Drools

2009-08-19 Thread André Thieme
Edson Tirelli schrieb: On the general issue, is it received wisdom that it's better not to insert map objects direct, at least for now until map support is fully there - or is it 6 of one / half a dozen? Maps are data structures, not Domain entities. When we speak about equivalence in

Re: [rules-users] not able to debug drools flow

2009-08-19 Thread Jakob Marovt
Thank you for your suggestion Maximiliano, debugging really works in Eclipse version 3.4 for me. So the problem is probably in compatibility with 3.5 (but maybe just on few specific configurations). Bye On Wed, Aug 19, 2009 at 3:28 PM, Maximiliano Batelli maxibate...@gmail.comwrote: Hello I

Re: [rules-users] Maps in Drools

2009-08-19 Thread André Thieme
Edson Tirelli schrieb: when Customer( $custId : id ) DailyOrders( count[$custId] == 1 ) then Btw, this brings me to a new syntax question for the default Drools rule syntax. Is this possible: when m:Map() eval( m.get(type) == Point, $x :

Re: [rules-users] Maps in Drools

2009-08-19 Thread Edson Tirelli
I will skip the first half of your e-mail as I am not sure what were the reasons for your nit-picking. If my explanation was not helpful for the public it was intended to, you are welcome to explain yourself. Regarding the part that matters, i.e., adding the support to other fact types,

Re: [rules-users] Maps in Drools

2009-08-19 Thread André Thieme
Edson Tirelli schrieb: I will skip the first half of your e-mail as I am not sure what were the reasons for your nit-picking. If my explanation was not helpful for the public it was intended to, you are welcome to explain yourself. Oh, I did not intend it to sound like nit-picking. I

Re: [rules-users] Maps in Drools

2009-08-19 Thread Edson Tirelli
ooops... correct version: when Map( this[type] == Point, $x : this[x] ) Map( this[type] == Circle, this[x] == $x ) then end 2009/8/19 Edson Tirelli tire...@post.com when Map( this[type] == Point, $x : this[x] ) Map( this[type] == Circle, x == $x ) then end 2009/8/19

[rules-users] how to use xml file instead of java object ?

2009-08-19 Thread tv.raghavan
I remember seeing a sample in jboss-esb sample where they were able to use xpath to query a xml file [sample extract] package com.jboss.soa.esb.routing.cbr #list any import classes here. import org.jboss.soa.esb.message.Message; import org.jboss.soa.esb.message.format.MessageType; expander

[rules-users] (no subject)

2009-08-19 Thread Nilima R
Hi, I am new to Drools. Can anyone help me with an example of Drools in jsp/servlets. Thanks, Nilima Rajendra Raichandani Tata Consultancy Services Mailto: nilim...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services

[rules-users] Cannot view Process Definitions in gwt-console

2009-08-19 Thread rbms
I am trying to deploy drools-guvnor, gwt-console in Tomcat. I am using mysql for persistence. I uploaded the process definitions in drools-guvnor.(I can see them Packages -- defaultPackage -- RuleFlows) However when I try to view them in Processes -- Process Definitions -- Definition List, I