Re: [rules-users] Complex pattern

2012-05-09 Thread Wolfgang Laun
Things would be simpler if the SubscriptionMatchers were facts, but collecting facts into lists isn't trivial anyway. It can be done by a set of cooperating rules (create Collector, add another fact to Collector, use results in Collector) but that's not as compact as this technique using a query

[rules-users] Drools 5.4.0.Final and jBPM 5.3.0.Final are being released

2012-05-09 Thread Toni Rikkola
Only blocker bugs can stop the release process. It is now too late to cherry pick bug fixes or documentation for the Final releases. Toni Rikkola ___ rules-users mailing list rules-users@lists.jboss.org

[rules-users] Start of Guvnor 5.4.0.CR1 results in javax.naming.NamingException

2012-05-09 Thread FlyingEagle
Hi, I try to start Guvnor 5.4.0.CR1 under JBoss 7.0.0. I used the guvnor-5.4.0.CR1-jboss-as-7.0.war from the guvnor-distribution-5.4.0.CR1. The guvnor.war was deployed successfully on the app server, but when I try to start Guvnor via Firefox, I get the following exception:

[rules-users] Guvnor - use database to store repository

2012-05-09 Thread devan.vanree...@gmail.com
Hi Guys, Quick question. Is it advisable for different instances of guvnor to use the same DB tables to store and retrieve assets or should different tables be used for different instances of Guvnor. Many thanks Devan -- View this message in context:

Re: [rules-users] Guvnor - use database to store repository

2012-05-09 Thread Lukáš Petrovický
devan.vanree...@gmail.com píše v St 09. 05. 2012 v 00:40 -0700: Quick question. Is it advisable for different instances of guvnor to use the same DB tables to store and retrieve assets or should different tables be used for different instances of Guvnor. That depends - what do different

Re: [rules-users] Guvnor - use database to store repository

2012-05-09 Thread devan.vanree...@gmail.com
Thanks so much for the quick response, that answers my question. The different Guvnor instances will all contain the same rules, assets, data etc, therefore as per your response I will configure to use the same tables. -- View this message in context:

Re: [rules-users] Creating a business process programatically, Jbpm5 tutorials for beginners

2012-05-09 Thread Ahmed Feki
http://www.jboss.org/jbpm/documentation http://docs.jboss.org/jbpm/v5.2/userguide/ 2012/5/8 bardelman feki.ahmed@gmail.com Hi, i m a jbpm5 beginner and i m reading the Drools Developer's Cookbook -[Packt Publishing, Jan 2012] and on its chapter 9 :jBPM5: Managing ,Business

[rules-users] Getting Current Date in LHS of a rule

2012-05-09 Thread sumatheja
Hi All, Can anyone tell me if there is a variable or standard way to get the *current date* and compare with the java.util.Date. I'm trying write the below rule but it doesn't work. It doesn't throw any error but the rule is not at all fired in any case rule new rule dialect java when

Re: [rules-users] Getting Current Date in LHS of a rule

2012-05-09 Thread Wolfgang Laun
Don't do this: LHS code should not have any side effects and should not depend on the time a CE or constraint is evaluated. If your variable should represent a yyy-mm-dd 0:00:00, you should establish a global variable of type Date and initialize it after creating your session and before inserting

Re: [rules-users] Getting Current Date in LHS of a rule

2012-05-09 Thread sumatheja
Thanks for the response. I will follow that. On Wed, May 9, 2012 at 11:38 AM, Wolfgang Laun wolfgang.l...@gmail.comwrote: Don't do this: LHS code should not have any side effects and should not depend on the time a CE or constraint is evaluated. If your variable should represent a yyy-mm-dd

[rules-users] http://localhost:8080/jbpm-console do not work

2012-05-09 Thread bardelman
hi, I have downloaded jbpm-install and installed jbpm by “ant install.demo”. After I execute “ant start.demo”, however I can’t access http://localhost:8080/jbpm-console.. i checked if the server is running on http://localhost:8080/ and found the jboss AS welcome page working. i also found a

[rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
I've a use case where I need to create a rule dynamically every time the user sends a request. My current understanding of Drools is that you need to create a KnowledgeBuilder and then add the rules I'm creating the KnowledgeBase as follows. private static KnowledgeBase

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Mauricio Salatino
You can do that step once and then reload the compiled rules from the disk, or use guvnor which will compile the rules for you. Cheers On Wed, May 9, 2012 at 12:55 PM, soumya_sd soumya...@yahoo.com wrote: I've a use case where I need to create a rule dynamically every time the user sends a

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
salaboy wrote You can do that step once and then reload the compiled rules from the disk, or use guvnor which will compile the rules for you. Cheers Thanks for responding so quickly. I tried using Guvnor. Do you think it will be faster than this ? In the worse case, the rules that I

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Mauricio Salatino
Can you explain a little bit more about your context? having completely dynamic rules is not an usual use case, rules tends to be static because they define the business logic that you want to apply. So please elaborate on the context. On Wed, May 9, 2012 at 1:07 PM, soumya_sd soumya...@yahoo.com

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Davide Sottara
Could you please provide a more detailed example? The usecase you propose is really interesting and the optimization of something very similar is on the todo-list (@salaboy: request-when rings a bell?) Now, depending on your exact requirements, there could be various options, more or less clean ;)

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Davide Sottara wrote Could you please provide a more detailed example? The usecase you propose is really interesting and the optimization of something very similar is on the todo-list (@salaboy: request-when rings a bell?) Now, depending on your exact requirements, there could be various

[rules-users] api's, factories and services

2012-05-09 Thread Mark Proctor
Just a reminder when doing api's Stage interfaces in internal-api and make sure you do factories for them, almost never expose new constructors to users. We provide both static factories and a service registry, and we ideally should continue to support both. i.e. we have

[rules-users] Help

2012-05-09 Thread seagull
Hi everyone, I am new to drools.net and I am testing some basic commands but can't seem to find help anywhere! I am trying to print the contents of a variable but for some reason, the contents are not printed! The first line (i.e. hello) on the other hand is being printed.. Is there a common

Re: [rules-users] http://localhost:8080/jbpm-console do not work

2012-05-09 Thread Ahmed Feki
is the jbpm-console only working on chrome?? is installing the GWT plugin on firefow a solution not to need chrome(which have a problem with windows 7 actually ...) 2012/5/9 bardelman feki.ahmed@gmail.com hi, I have downloaded jbpm-install and installed jbpm by “ant install.demo”.

[rules-users] Guvnor sync issues

2012-05-09 Thread devan.vanree...@gmail.com
Hi Guys, Please assist. I have Guvnor running on 2 different machines. Both Guvnors have been configured exactly the same to use Oracle for the storing the BRMS assets. They have exactly the same repository.xml. Because of this I am expecting that when I make changes to Guvnor on the one

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
Users changing rules IS the correct use-case of drools (I would even say that if rules never change, drools is likely to be worse than pure java). What others said is changing the rules at each request by regenerating and recompiling is not. I can't imagine that users may change rules at each

Re: [rules-users] Guvnor sync issues

2012-05-09 Thread Tihomir Surdilovic
To do this, you will have to cluster your JCR, see this post for more info: http://blog.athico.com/2011/01/configuring-multiple-guvnor-instances.html Hope it helps. Tihomir On 5/9/12 11:08 AM, devan.vanree...@gmail.com wrote: Hi Guys, Please assist. I have Guvnor running on 2 different

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote Users changing rules IS the correct use-case of drools (I would even say that if rules never change, drools is likely to be worse than pure java). What others said is changing the rules at each request by regenerating and recompiling is not. I can't imagine that

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote Users changing rules IS the correct use-case of drools (I would even say that if rules never change, drools is likely to be worse than pure java). What others said is changing the rules at each request by regenerating and recompiling is not. I can't imagine that

Re: [rules-users] Guvnor sync issues

2012-05-09 Thread devan.vanree...@gmail.com
Thanks so much, I have referred as well to Jackrabbit Wiki - http://wiki.apache.org/jackrabbit/Clustering#Sample_Cluster_Configurations -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-sync-issues-tp3974395p3974522.html Sent from the Drools: User forum mailing list

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
At this point I'm designing for the worst case i.e., I'm assuming the rules with change with every request. Keeping a cache will work for the worst case, but will work faster for normal (see below) cases. You can imagine the user changing these rules in a span of less than a minute.

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Davide Sottara
If the structure of the constraints/filters the user can define remains static, and only the values are changing, then a single rule with parametric joins will be enough. E.g.: Params( $cat : categorySet, $minPrice : minPrice, $maxPrice : maxPrice, ) Product( category in $cat, price =

Re: [rules-users] Help

2012-05-09 Thread Wolfgang Laun
Try to print p.getName(). -W On 9 March 2012 15:20, seagull g.christabe...@gmail.com wrote: Hi everyone, I am new to drools.net and I am testing some basic commands but can't seem to find help anywhere! I am trying to print the contents of a variable but for some reason, the contents are

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote At this point I'm designing for the worst case i.e., I'm assuming the rules with change with every request. Keeping a cache will work for the worst case, but will work faster for normal (see below) cases. I don't see how can a cache would work in the worse

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Wolfgang Laun
Merely filtering a subset of data items from a collection according to user's changing needs and whims is NOT the primary use case of a production rule system. This kind of problem has been solved adequately and efficiently by SQL queries or some similar DB query technique. It is true that such

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
laune wrote Merely filtering a subset of data items from a collection according to user's changing needs and whims is NOT the primary use case of a production rule system. This kind of problem has been solved adequately and efficiently by SQL queries or some similar DB query technique.

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Wolfgang Laun
On 9 May 2012 19:52, soumya_sd soumya...@yahoo.com wrote: laune wrote Merely filtering a subset of data items from a collection according to user's changing needs and whims is NOT the primary use case of a production rule system. This kind of problem has been solved adequately and

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
laune wrote On 9 May 2012 19:52, soumya_sd lt;soumya_sd@gt; wrote: laune wrote Merely filtering a subset of data items from a collection according to user's changing needs and whims is NOT the primary use case of a production rule system. This kind of problem has been solved

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
@ laune - so are you suggesting that I don't use Drools ? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-a-faster-way-of-doing-this-in-Drools-tp3973888p3974950.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread GPatel
so you are using drools to build on-the-fly queries based on user input. You could probably do this via static rules. Since you basically have 4 variables (price, avg_user_rating, num_ratings, category), you could write 4 rules, one each that filters based on one of the 4 variables and then

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
I did not assume that I've seen all use cases, nor that what I am a telling is the absolute truth. See no offense in my previous post. Yes, I was supposing some use case of my own experience, but please note it is the first post when you describe what you are really trying to do, ie

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
And I did not see all pending posts ... By reading them, there is another fact that lead to don't use drools. You said that you query a distant DB. So, if you write rules to filter your data, you will have first to get ALL data from your distant DB, add ALL data in the drools WM, and only then

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote I did not assume that I've seen all use cases, nor that what I am a telling is the absolute truth. See no offense in my previous post. No offense taken at all. In fact, I would like to thank you for asking important questions. These questions help me validate my

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote And I did not see all pending posts ... By reading them, there is another fact that lead to don't use drools. You said that you query a distant DB. So, if you write rules to filter your data, you will have first to get ALL data from your distant DB, add ALL data in

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Vincent LEGENDRE
... OR load everything into a WM and then apply these dynamic rules. Beware, I am not sure whether we can add/remove rules in an existing session (I don't think so but I may be wrong). Basically, a WM is built from a kBase, not the inverse ... So you will have to recompile rules, that re-add

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread soumya_sd
Vincent Legendre wrote ... OR load everything into a WM and then apply these dynamic rules. Beware, I am not sure whether we can add/remove rules in an existing session (I don't think so but I may be wrong). Basically, a WM is built from a kBase, not the inverse ... So you will have to

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Davide Sottara
@Vincent: it should indeed be possible to hot-plug rules directly into a knowledge BASE (meaning all sessions derived from that KB will be affected: existing facts will be matched against the new rules). More typically, this is done using a Knowledge Agent to manage the Knowledge Base. Whether

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Davide Sottara
@Vincent: it should indeed be possible to hot-plug rules directly into a knowledge BASE (meaning all sessions derived from that KB will be affected: existing facts will be matched against the new rules). More typically, this is done using a Knowledge Agent to manage the Knowledge Base. Whether

Re: [rules-users] Is there a faster way of doing this in Drools ?

2012-05-09 Thread Wolfgang Laun
You can compile Java by invoking javac from a Java program and load and execute the resulting class file. 1.7 has an API for calling the Java compiler. -W On 9 May 2012 20:21, soumya_sd soumya...@yahoo.com wrote: laune wrote On 9 May 2012 19:52, soumya_sd soumya_sd@ wrote: I didn't