Re: [rules-users] populating global variable in Condition Section?

2009-08-21 Thread Greg Barton
Of course, I had to test that assertion. :) $ java -Xmx128M -server -jar target/DroolsExistence-1.0.jar not.drl 5 25000 2395ms $ java -Xmx1024M -server -jar target/DroolsExistence-1.0.jar not_exists.drl 5 25000 121378ms You ain't kiddin'! 50x slower requiring 9x the memory. --- On Fri,

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

2009-08-21 Thread Kris Verlaenen
Because the gwt-console does not allow you to specify which knowledge package should be loaded (yet), it currently uses the "default" package. Putting your rule flow in a package called "default" (and then building that package in Guvnor) should solve your issue I think. You could also change the

Re: [rules-users] Drool Flow persistence Doubt

2009-08-21 Thread Kris Verlaenen
All running process instances are always stored persistently after their state has been changed, and they can be reloaded from the database if they are no longer in memory. So whenever the application needs to be restarted, you must restore the session (either creating a new one or reloading it

Re: [rules-users] populating global variable in Condition Section?

2009-08-21 Thread Wolfgang Laun
It is rather common for people to write something like "(not (exists (A)))," but this is just a very inefficient way to write (not (A)). Kudos to Ernest Friedman-Hill to put this sentence into the Jess documentation. Maybe I should quote hiom in the Drools Expert doc ;-) -W On Fri, Aug 21,

Re: [rules-users] populating global variable in Condition Section?

2009-08-21 Thread Shah, Malay
May be I have not put the question right. We have a drool rule that is running extremely slow for large sets of data. The rule is something like: For every object A, perform action if there does not exist an object B such that A.id = B.id. And the corresponding drool rule is as follows: when

Re: [rules-users] populating global variable in Condition Section?

2009-08-21 Thread Greg Barton
This is a galactically bad idea. Using a global in this way is inherently unsafe as there's no guarantee that ebtween the time you set the var and when it's used later in the condition that the value is the same. What is your reason for wanting to use a global in this way? You should use a te

[rules-users] populating global variable in Condition Section?

2009-08-21 Thread Shah, Malay
Hi, Is it possible to populate a global variable in the condition section of the drool rule, and use it later in the condition itself? I currently have a global HashSet variable that I construct before firing the rule, but I would like this code of constructing this global variable to be with the

Re: [rules-users] Looking for attributes on an element obtainedfroma Map

2009-08-21 Thread Pegram, Macon
Ok.. Think I've answered my own question.. (Just looking for confirmation at this point). Looks like it's: rule "deal finder" when SearchItem($upc : upc != null) // see if a UPC was provided StockRoom($stock : stock) // get a handle to the stock HashMap ($item : this[$upc] != nul

Re: [rules-users] Maps in Drools

2009-08-21 Thread André Thieme
Edson Tirelli schrieb: > > > 2009/8/20 André Thieme > > > Would there not be an addition to the syntax needed, for the default > rule language? For mvel it would not require a change I guess. > > > No, as I mentioned to you, the idea

Re: [rules-users] Maps in Drools

2009-08-21 Thread André Thieme
Edson Tirelli schrieb: > >Andre, > >The misunderstanding here is that the LHS, except for code blocks > like "eval", "return value expressions" and "accumulate code blocks", > are all "Drools Language". When you use the "dialect" attribute in a > rule or package you are telling the com

Re: [rules-users] Looking for attributes on an element obtainedfrom a Map

2009-08-21 Thread Pegram, Macon
The example below was a contrived one for the purposes of asking the question. What you've proposed is definitely the "right" way to do things. I realize accessing items from a map in the manner I'm inquiring about is a little contrary to "best practices" with Drools. However, I would like t

Re: [rules-users] Looking for attributes on an element obtained from a Map

2009-08-21 Thread Greg Barton
Do Items have a UPC? Any reason why you can't insert the Items directly into working memory? Then you could do this: rule “deal finder” when SearchItem($upc : upc != null) Item(onSale == true, upc == $upc) then Buy stuff end --- On Fri, 8/21/09, Pegram, Macon wrote: > From: Pegr

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

2009-08-21 Thread Toni Rikkola
Hi, This feature is not in the Guvnor at the moment, but I was planning to add it when I start working on GUVNOR-101. https://jira.jboss.org/jira/browse/GUVNOR-101 Toni Premkumar Stephen wrote: > Hello everyone, > > Currently, the validate functionality ensures that rules have proper > synta

[rules-users] Looking for attributes on an element obtained from a Map

2009-08-21 Thread Pegram, Macon
I was hoping the recent conversation regarding maps this would come up, but so far it hasn't. How do I check for conditions on the element referenced in the map? So given the following scenario: SearchItem is the item being searched for by the user Item has the attributes: UPC

Re: [rules-users] Maps in Drools

2009-08-21 Thread Edson Tirelli
2009/8/20 André Thieme > Would there not be an addition to the syntax needed, for the default > rule language? For mvel it would not require a change I guess. No, as I mentioned to you, the idea is for the DRL to remain the same, so that the rules author does not have to worry about what the IT

Re: [rules-users] Maps in Drools

2009-08-21 Thread Edson Tirelli
Andre, The misunderstanding here is that the LHS, except for code blocks like "eval", "return value expressions" and "accumulate code blocks", are all "Drools Language". When you use the "dialect" attribute in a rule or package you are telling the compiler what dialect (MVEL or Java) you wil

[rules-users] Drool Flow persistence Doubt

2009-08-21 Thread Pardeep . Ruhil
Hi Users, I am having a doubt regarding the Drools Workflow in my scenario. I want to integrate Drools Flow in my application and have some doubts regarding the persistence of Workflow process instances. Let suppose I have a workflow running in my application and at point my application crashe

[rules-users] RuleML-2009: Second Call for Submissions to the 2009 Rules Challenge

2009-08-21 Thread Wolfgang Laun
[Our apologies if you receive duplicates of this posting] 3rd International Rules Challenge at RuleML-2009 co-located with the Business Rules Forum November 5-7 2009, Las Vegas, Nevada, USA http://2009