Re: [rules-users] OSGI, classloading, and imports in KnowledgeBuilder

2009-08-13 Thread Lasse . Wallentin
Mark Proctor wrote on 14-08-2009 03:13:42: > We'd really like to improve out OSGi friendlyness. From getting > Drools to work perfectly as an OSGi service, to getting our build > system to publish all the necessary bundles. But we need people in > the commnity to help us, you know where to find

Re: [rules-users] Why is a flat object recommended?

2009-08-13 Thread Greg Barton
I would hesitate using "from" for accessing nested structures for performance reasons. See the attached project: $ java -jar target/DroolsNestedTest-1.0.jar from.drl Time: 980ms BAR Duplicates: 58 FOO Duplicates: 38 $ java -jar target/DroolsNestedTest-1.0.jar reference.drl Time: 36ms BAR Duplic

Re: [rules-users] Drools and Clojure

2009-08-13 Thread Greg Barton
Well, you never know it performs until you try. :) See attached project. $ java -jar target/DroolsMapTest-1.0.jar eval.drl {bar=0} {foo=100} Time: 6607ms $ java -jar target/DroolsMapTest-1.0.jar mvel.drl {bar=0} {foo=100} Time: 13077ms So eval ended up being 2x as fast, at least for thi

Re: [rules-users] how to convert drl to dsl

2009-08-13 Thread drools
thanks Isilva, i will try by using this lsilva wrote: > > We use a SQL like statements for our dsl. For example: > > DRL FORM: > rule 'Rank accomodation name' > salience 90 > when > $accBase: AccomodationBase() > not AccomodationBase( eval( $accBase instanceof AccomodationRank) ) >

Re: [rules-users] Drools and Clojure

2009-08-13 Thread Mark Proctor
André Thieme wrote: Mark Proctor schrieb: Map( this['c'] == 206 ) That should work, we do support MVEL syntax for maps and arrays - we just don't suppor method calls, yet. Hello Mark. I just tested it and it indeed works for me. Although as I understand it, this will be compiled int

Re: [rules-users] OSGI, classloading, and imports in KnowledgeBuilder

2009-08-13 Thread Mark Proctor
We'd really like to improve out OSGi friendlyness. From getting Drools to work perfectly as an OSGi service, to getting our build system to publish all the necessary bundles. But we need people in the commnity to help us, you know where to find us if you want to help out, as we have so much oth

Re: [rules-users] how to convert drl to dsl

2009-08-13 Thread Luis Silva
We use a SQL like statements for our dsl. For example: DRL FORM: rule 'Rank accomodation name' salience 90 when $accBase: AccomodationBase() not AccomodationBase( eval( $accBase instanceof AccomodationRank) ) $accRank: AccomodationRank( level == $accBase.level, description == $accB

Re: [rules-users] Drools and Clojure

2009-08-13 Thread André Thieme
With what have you been wrong Greg? I understood Marks reply in such a way that the mvel dialect allows to use Maps without eval. But this is just syntactic sugar. When compiled or interpreted (I don't know which of those Drools will do with mvel rules), this will get replaced with an eval under th

Re: [rules-users] Drools and Clojure

2009-08-13 Thread André Thieme
Mark Proctor schrieb: > Map( this['c'] == 206 ) > > That should work, we do support MVEL syntax for maps and arrays - we > just don't suppor method calls, yet. Hello Mark. I just tested it and it indeed works for me. Although as I understand it, this will be compiled into an expression using eva

Re: [rules-users] Drools and Clojure

2009-08-13 Thread Greg Barton
I was wrong. :). See Mark's later email. GreG On Aug 13, 2009, at 17:25, André Thieme wrote: Greg Barton schrieb: There's no reason why a rete based system couldn't use maps as first class objects, but Drools is heavily oriented towards POJOS. Using eval in the way you have is pretty much the

Re: [rules-users] Drools and Clojure

2009-08-13 Thread André Thieme
Greg Barton schrieb: > There's no reason why a rete based system couldn't use maps as first > class objects, but Drools is heavily oriented towards POJOS. Using > eval in the way you have is pretty much the way to go. Thanks for confirming that. For now I know that I am doing it right by using ev

Re: [rules-users] Conversion from Normal Decision Tables to Web-Based Tables and vice-versa

2009-08-13 Thread Barry K
Have you made any progress on this migration. I am currently estimating the migration path for our Excel based rules to web based decision tables. Can you describe the steps you were required to take? Anyone else, please feel free to comment on your Excel to Web Decision Table migrations. Tha

Re: [rules-users] Problem with JPA session persistence in Drools Flow (5.0.1)

2009-08-13 Thread SBalakrishnan
Thanks Kris Will download from the below link and check. Quick question, do you know when the official 5.1 release will be available ? Kris Verlaenen wrote: > > The fix for this issue has been added to trunk about a month ago already > I think, have you already tried with the 5.1.0 SNAPS

Re: [rules-users] OSGI, classloading, and imports in KnowledgeBuilder

2009-08-13 Thread Simon Thum
lasse.wallen...@apcc.com wrote: > Ok, I finally got it running. I had missed an import in the excel sheet so > I had a dependency on another bundle. Cool! > All this debugging has made me understand (and appreciate) the solution > sketched earlier by Faron Dutton more clearly. However it still s

[rules-users] how to convert drl to dsl

2009-08-13 Thread drools
hi all, can any one help me how can convert drl to dsl for drools,let say for the following code what will be the dsl, rule 'Rank accomodation name' salience 90 when $accBase: AccomodationBase() not AccomodationBase( eval( $accBase instanceof AccomodationRank) ) $accRank: Acc

Re: [rules-users] Why is a flat object recommended?

2009-08-13 Thread Mark Proctor
Java pojo's nested fields is just a weak way to represent relations between objects. If you want to exploit those properly in a rule engine, best to use real relations. Mark Libor Nenadál wrote: Mark Proctor wrote: We can exploit cartesian products and indexing for == constraints. If its a

Re: [rules-users] Type declaration in DSL

2009-08-13 Thread drools
hi all, can any one help me how can convert drl to dsl for drools,let say for the following code what will be the dsl, rule 'Rank accomodation name' salience 90 when $accBase: AccomodationBase() not AccomodationBase( eval( $accBase instanceof AccomodationRank) ) $accRank: Acc

Re: [rules-users] Why is a flat object recommended?

2009-08-13 Thread Libor Nenadál
Mark Proctor wrote: > > We can exploit cartesian products and indexing for == constraints. If > its a nested model we have to iterate over all possible instances. The > other problem is if the nested model changes the engine has no idea this > has happened, which if you are not careful can le

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

2009-08-13 Thread Michael Rhoden
You can do this using the "extends" keyword in your rule. Rule "shopping cart total exceeds 4000, give 50% discount"        when                  then         end Rule "if order between 6 to 9 pm give additional discount of 20 %" extends "shopping cart total exceeds 4000, g

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

2009-08-13 Thread Libor Nenadál
Hi Pardeep, you cannot nest rules. You can solve the situation with 2 rules like: rule "big amount discount" when Basket( total > 4000 ) discount: Discount() then discount.percentage = discount.percentage + 20; end rule "preferred time discount" when Clock( 6 < time < 9 )

Re: [rules-users] Using multiple threads for parallel rule flow execution

2009-08-13 Thread Edson Tirelli
Tobias, I believe that this is more than a flow question. The answer depends on another question: what is taking too much time to execute? The evaluation of the rules in A and B (LHS) or the actual consequence execution of rules in A and B (RHS)? If it is LHS of the rules that is taki

[rules-users] Using multiple threads for parallel rule flow execution

2009-08-13 Thread Tobias Buchloh
Hi *, I need to speed up the total processing time needed for the execution of a rule flow which consists of multiple rule flow groups (e. g. A, B and C). I'm thinking about to parallelize the execution of A and B. +--> A --> + Start --> split + +--> join --> C --> End