Re: [rules-users] Question about the Nature of Ruleflows

2012-08-21 Thread Wolfgang Laun
@Benjamin: Esteban just confirms what I was trying to explain in my previous answer. Ruleflow decisions aren't made on a per-fact basis - all facts in Working Memory participate in their evaluation. To activate one or other set of rules, an agenda group might be sufficient; your "full-fledged exa

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread Wolfgang Laun
The error message seems to indicate that the compiler fails to recognize the type of the argument "customer". Try adding a cast to the type of the argument as given in the function declaration. - Although, I don't see how this can happen, given that your first posting accurately reflects the code

Re: [rules-users] modify and update is not working in the rule file

2012-08-21 Thread Davide Sottara
*DISCLAIMER: PLEASE NOTICE THAT THIS IS NOT RECOMMENDED, AND IN ANY CASE SHOULD BE DONE WITH ***EXTREME*** CARE.* This said, you need to create a KnowledgeBase passing a RuleBaseConfiguration. Take a look at RuleBaseConfiguration.getComponentFactory(), which returns a ReteooComponentFactory. This

Re: [rules-users] What's the difference between Drools and other constraints solvers?

2012-08-21 Thread Davide Sottara
My 2 cents on some side aspects of this debate (which I leave to Geoffrey :)) Most LP solvers are written in C/C++, which is great for efficiency but also a limitation on portability and platform (in)dependence. Provided that you find a version of the code that compiles in your specific environme

Re: [rules-users] What's the difference between Drools and other constraints solvers?

2012-08-21 Thread zjg_robin
Thank you, Geoffrey. But it seems in Choco and similar solvers, I only need to encode the constraints and the solvers do the rest things for me, while, in Drools, I need to write the constraints with skills maybe plus other object data structures which may be complicated to design. Is this concept

Re: [rules-users] A few general questions on scaling StatefulKnowledgeSessions

2012-08-21 Thread lucas malson
Thread Management... Previous posts were rejected in error... If the entirety of what you're making a decision on can be expressed in a handful of facts then it may be reasonable to use a stateless session, as you will need to insert them for every request. We could only do so if we were to enab

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread Davide Sottara
As for the function, there's a minor known bug. The packagebuilder is sequential and will need the function to be defined before the rule that uses it. (Please open a JIRA if you think this is problematic) Davide -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Upgrade

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread dxande6
lhorton, thank you very much for the ant help. Unfortunately, I've implemented the exact same thing and still seem to be getting the same results. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321p4019329.html Sent from the Drools: User forum ma

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread dxande6
Is there any reason the function wouldn't work? I've removed the generics to get around that issue for now, but I still get an error in relation to calling the function. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Upgrade-to-5-4-tp4019321p4019328.html Sent from th

[rules-users] Drools 5.4 and Java Generics

2012-08-21 Thread dxande6
I’m receiving errors when compiling my .drl files as a result of using Java generics. Example: rule "Rule 1 - Testing" no-loop true when $orderInfo : OrderingInfo (orderedProducts != null) then Customer customer = $orderInfo.getCustomer();

Re: [rules-users] Question about the Nature of Ruleflows

2012-08-21 Thread Esteban Aliverti
Drools Flow (aka JBPM5) will look for all the Persons and Dogs you have in your session. Since the conditions in an XOR gateway are evaluated in order, the first one being true is going to be selected. In your case, after you insert the Persons, both rules are activated, but the gateway is always g

Re: [rules-users] Question about the Nature of Ruleflows

2012-08-21 Thread BenjaminWolfe
Thanks Wolfgang. My original post was a conceptual analogy. But this still isn't working right for me, so I've written out a full-fledged example to see if you or anyone else can help. The full example is behaving exactly the way my real (important) code is -- which is the wrong way for the busi

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread lhorton
My shop is still on 5.2.0.Final, but FWIW I did get build.xml working to compile rules files (in my case it was for decision tables). I remember it took a while to get all the classpaths correct. Below is a snippet from my build.xml; of course your jars will be different. Also, I don't know if t

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread dxande6
I cleaned up this rule and method quite a bit as an example…..the getCode(customer), is passing the argument but I still get the same message. Unable to Analyse Expression getCode(customer): [Error: unable to resolve method using strict-mode: ….getCode(java.lang.Object) I tried moving the functio

Re: [rules-users] Drools Upgrade to 5.4

2012-08-21 Thread Wolfgang Laun
See below. On 21 August 2012 21:05, dxande6 wrote: > I'm upgrading to Drools 5.4 from Drools 5.0.1. When I try to compile the > .drl files into a .pkg I'm getting a couple of strange errors. Hoping > someone can help. > > Here is the .drl > > rule "Rule 1 - Testing" > no-loop true > wh

[rules-users] Drools Upgrade to 5.4

2012-08-21 Thread dxande6
I'm upgrading to Drools 5.4 from Drools 5.0.1. When I try to compile the .drl files into a .pkg I'm getting a couple of strange errors. Hoping someone can help. Here is the .drl rule "Rule 1 - Testing" no-loop true when $orderInfo : OrderingInfo (orderedProducts != nul

Re: [rules-users] Problem with gateway(diverge) executing first

2012-08-21 Thread BenjaminWolfe
Have you had any success in this? I'm having trouble with a diverging gateway in a similar situation. -- View this message in context: http://drools.46999.n3.nabble.com/Problem-with-gateway-diverge-executing-first-tp131383p4019320.html Sent from the Drools: User forum mailing list archive at N

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Wolfgang Laun
You are not writing rules - you are using rules to disguise the fact that you are using if statements to process your data. What is "droolsRequest" and how is it declared? If this were a real rule, it would be when DroolsRequest( address.stateCode == "MA" ) then ... no-loop is nonsense in

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Esteban Aliverti
You can still have different change-sets pointing to different resources (you can share these resources too) for different kbases. Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Tue, Aug 21, 2012 at 5:21 PM, Rana wrote: > I

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Rana
I am actually using ChangeSet, because we did not wanted the rule files to loaded many times, rather load at once and use scanner to look for any changes. -- View this message in context: http://drools.46999.n3.nabble.com/fireUntilHalt-is-halt-forever-tp4019146p4019317.html Sent from the Drools

Re: [rules-users] How to fire rules of a specific rule file from ChangeSet

2012-08-21 Thread Esteban Aliverti
I would say to have a Map where the keys are "AndroGel", "Another Thing", etc and the value is the kbase containing only the rules that apply to that particular product. Best Regards Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Tue, Aug 2

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Esteban Aliverti
Instead of grouping your rules using agenda-group maybe you could partition your kbase to only have the rules for a particular Product (?) Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Tue, Aug 21, 2012 at 5:00 PM, Rana wrot

Re: [rules-users] How to fire rules of a specific rule file from ChangeSet

2012-08-21 Thread Rana
This is what I want If the Generic Name is AndroGel, then focus on firing AndroGel rules only, non other. If it is not AndroGel, it should check for other Generic Name and if it matched it should only focus on firing that rules only. rule "AndroGel Generic Name" no-loop true auto-

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Rana
Here is the example rule "AndroGel Provider State" no-loop true salience 95 agenda-group "AndroGel" when eval( droolsRequest.address.stateCode == "MA" ) then logging(); drools.halt(); end the other rule is ver

Re: [rules-users] How to fire rules of a specific rule file from ChangeSet

2012-08-21 Thread Wolfgang Laun
On 21/08/2012, Rana wrote: > Ok, for my rule files, the facts for all the rules are same. That is the > problem. I guess I have to merge everything into one rule file. I don't see the reason why this should be so. > > So can a rule have multiple agenda Group, something like this. > > rule > ag

Re: [rules-users] modify and update is not working in the rule file

2012-08-21 Thread Wolfgang Laun
Add a fact User with field group, set appropriately, and extend the conditions of your rules as required. I don't think that using agenda groups would be a good approach. -W On 21/08/2012, Rana wrote: > I have a requirement which says that only few rules should be fired based > on > the user g

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Wolfgang Laun
On 21/08/2012, Rana wrote: > One question, my rules have the same facts, and this is why it is > activating > all the satisfied rules before firing. is there anyway to stop this. > How do you determine that there are many "satisfied rules"? And, if they are on the agenda after inserting facts, wh

[rules-users] Integrate Guvnor with Weblogic server user authentication

2012-08-21 Thread jasonxzhong
Has anyone been able to configure Guvnor so it can use Weblogic user authentication? Our goal is to allow users created and managed in Weblogic security realm being able to log in to Guvnor after being autheticated by Weblogic. There is an article that describes how to enable authentication using

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Rana
Ok, it is working now. I don't know what was the problem. I guess the rules were not right before. One question, my rules have the same facts, and this is why it is activating all the satisfied rules before firing. is there anyway to stop this. I mean think about it. If I have million rules with

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Wolfgang Laun
Is the consequence of the rule where you call drools.halt() really executed? -W On 21/08/2012, Rana wrote: > I mean to say is that, control does not come back to > workingMemory.fireUntillHalt(). It just hangs in the rule file itself. Does > not do anything at all. > > What is the use of that

Re: [rules-users] modify and update is not working in the rule file

2012-08-21 Thread Rana
I have a requirement which says that only few rules should be fired based on the user group. How am I suppose to do that. Only thing I think of is that I have to setFocus in the rules on either Agenda-group or Activation-group. please let me know. Thanks. -- View this message in context: htt

Re: [rules-users] How to fire rules of a specific rule file from ChangeSet

2012-08-21 Thread Rana
Ok, for my rule files, the facts for all the rules are same. That is the problem. I guess I have to merge everything into one rule file. So can a rule have multiple agenda Group, something like this. rule agenda-group A,B,... when //condition then //consequence end or C

Re: [rules-users] fireUntilHalt() is halt forever

2012-08-21 Thread Rana
I mean to say is that, control does not come back to workingMemory.fireUntillHalt(). It just hangs in the rule file itself. Does not do anything at all. What is the use of that. If I write like halt in the rule then it should stop the rule firing and control should be sent back to workingMemory.f

Re: [rules-users] Rules Deployment

2012-08-21 Thread Geoffrey De Smet
In the simplest case, just add the drl files as classpath resources. For example: src/main/resources/org/domain/myRules.drl get copied to target/classes/org/domain/myRules.drl get copied to target/myWar.war!WEB-INF/classes/org/domain/myRules.drl Op 21-08-12 12:12, RulesUsers schreef: > Hi

[rules-users] Rules Deployment

2012-08-21 Thread RulesUsers
Hi all, We are using rules in our java based project that connects to jboss for jms. To implement rules, we include drools specific jar files in the code itself. When this code is executed, rules also get executed and our purpose is served. Rules file is written manually and is called from within

Re: [rules-users] What's the difference between Drools and other constraints solvers?

2012-08-21 Thread Geoffrey De Smet
> and what are > the superior aspects of Drools (if any) than others? 1) It has better results, especially when scaling out. The OR competitions show this clearly. For example: 1a) In the google roadef competition, the top 80 teams competed for 20k € prize money, of which 10k € reserved excluded

Re: [rules-users] NPE loading Drools 5.4.0.Beta1 using drools-spring

2012-08-21 Thread Davide Sottara
Please see https://issues.jboss.org/browse/JBRULES-3607 -- View this message in context: http://drools.46999.n3.nabble.com/NPE-loading-Drools-5-4-0-Beta1-using-drools-spring-tp3639227p4019300.html Sent from the Drools: User forum mailing list archive at Nabble.com. _

[rules-users] What's the difference between Drools and other constraints solvers?

2012-08-21 Thread zjg_robin
Hi, I want to solve some constraint satisfication problems (CSP) and it seems that Drools and other constraints solvers like JaCoP(http://jacop.cs.lth.se/)and choco (http://www.emn.fr/z-info/choco-solver/) are all fit in such a field. So, my question is what is the difference between Drools and ot