Re: [rules-users] Problem in DSL with Type constraints

2011-03-31 Thread Wolfgang Laun
There is a disclaimer in the Expert documentation that inserting constraints doesn't work for the more "exotic" forms. Basically, a hyphenated line is inserted into the last line where there are parentheses. This is done using very simple regex matching, which is bound to fail for anything more com

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Benson Fung
Yes, this is simple and easy to simple. However, if the solution is an enterprise level with tons of rules. It will have a lot of rule files in the repository, it will make the rule maintenance/house-keeping difficult. I prefer to design an algorithm/framework programmatically to handle this si

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Jevon Wright
If you split up your rules across many rule files, you can selectively execute specific rule files. Very simple but it works :-) Jevon On Thu, Mar 31, 2011 at 6:58 PM, Benson Fung wrote: > Hi, > > If there are 10 rules in the drools rulebase, and right now I would > like to execute one of the pa

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Benson Fung
Hi Steven, Would you share your case? Thanks Benson 2011/4/1 Steven Williams : > I have actually used this method for the one valid case I have thought of - > unit testing rules. > Steve > > > 2011/4/1 Swindells, Thomas >> >> Agreed, >> >> But if you really do want to you can setup an agenda f

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Steven Williams
I have actually used this method for the one valid case I have thought of - unit testing rules. Steve 2011/4/1 Swindells, Thomas > Agreed, > > But if you really do want to you can setup an agenda filter so that only > the activation for the rule you care about is fired – but I don’t think > t

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Benson Fung
The reason is that as the no. of rules in the rulebase grows, it is possible that some of the rule can be re-used/shared for specific purpose. I am not sure this is the good reason. Of course, like you said, if it can solved by using agenda-group, activation-group, salience. That will be wonderfu

[rules-users] Strange intermittent problem with Drools Flow

2011-03-31 Thread Dan Nathanson
Hi, I'm seeing some odd behavior in some of my test cases. And it only seems to happen to one guy. And he's done fresh checkouts of the code, blown away his local M2 repository and verified installed software like OS and Java is same as everyone else's. I have some test cases that build up some

Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread kylin8627live
This morning I tested it, it works fine. My startProcess rule like this. rule "StartProcess" salience 100 when eval(true); then #kcontext.getKnowledgeRuntime().startProcess("ProcessName"); drools.getWorkingMemory().startProcess("Proc

Re: [rules-users] [planner] Hard constraints in drl, MoveFactory or isMoveDoable

2011-03-31 Thread Geoffrey De Smet
Hi Evert, Op 24-03-11 15:10, Evert Penninckx schreef: > Hi > > General question on the drools planner. If I'm not mistaken, I see three > ways to impose hard constraints: > > 1. Generate violations in the scoring DRL. This is the normal way for hard constraints. > 2. Check them in isMoveDoable Thi

Re: [rules-users] Problem in DSL with Type constraints

2011-03-31 Thread Leonardo Gomes
Small correction. This: [condition][RestrictedLocation]- test=$test : test should actually be: > [condition][RestrictedLocation]- test=$test == test > but I still have the problem :) On Thu, Mar 31, 2011 at 6:02 PM, Leonardo Gomes wrote: > Hi, > > Given the following DSL definition: > > [con

[rules-users] Problem in DSL with Type constraints

2011-03-31 Thread Leonardo Gomes
Hi, Given the following DSL definition: [condition][RestrictedLocation]Is restricted by = ArrayList(size >= 1) from > collect(RestrictedLocation() from $restrictedLocationList) > [condition][RestrictedLocation]- test=$test : test > and the following rule: rule "Test" > when > Is restricted

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Swindells, Thomas
Agreed, But if you really do want to you can setup an agenda filter so that only the activation for the rule you care about is fired - but I don't think there are many valid cases where this is needed/desirable/appropriate. Thomas From: rules-users-boun...@lists.jboss.org [mailto:rules-users-b

Re: [rules-users] Moving Rules and/or Packages from one Guvnor instance to another

2011-03-31 Thread Tihomir Surdilovic
Check out the drools-ant jackrabbit migration task http://blog.athico.com/2011/03/using-drools-ant-to-migrateback-up.html. It migrates the entire repository and you would not loose your rule assets version history, metadata, snapshots, existing user permissions etc. You may also look into setti

[rules-users] Moving Rules and/or Packages from one Guvnor instance to another

2011-03-31 Thread Dean Whisnant
Hello, My Guvnor development environment has 2 servers, DEV and TEST. A typical lifecycle includes Business Analysts and developers authoring rules on DEV in multiple packages and then doing releases to the TEST server for our QA folks to verify our work. Eventually, we will also bring our pro

Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread Jeffrey DeLong
I know you said this is only part of the audit log but I don't see any facts inserted or rules being activated. The fact insertion statements should appear before the StartProcess rule is activated. Can you paste the entire audit log for running the test scenario? On Mar 30, 2011, at 11:42 PM,

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Michael Anstis
Why would you want to execute a single rule? The logic you'd write to determine which rule to fire should itself be part of the rules: So, for example, if you want to validate facts of type "Smurf" then write a rule that matches on "Smurf". When you insert a "Smurf" only the rules that match on th

Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread Mauricio Salatino
The question is, when are you firing all the rules(activations)? In other words, when are you calling the fireAllRules() method? Greetings. On Thu, Mar 31, 2011 at 2:42 AM, kylin8627live wrote: > Hi Jeff, > > I met the same problem. I added the rule you mention to Guvnor and it is > able to trig

Re: [rules-users] New in Drools, java.lang.NullPointerException at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)

2011-03-31 Thread Wolfgang Laun
2011/3/31 Manuel Ortiz > Hi Wofgang: > > Thank youvery much for your response. I was replaying to Mauricio when your > email has arrived. I hope the test case is useful. > > Thanks. Files are attached to the JIRA and JIRA is now at "critical". -W > Best regards, > > Manuel Ortiz. > > > 2011/3/3

Re: [rules-users] New in Drools, java.lang.NullPointerException at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)

2011-03-31 Thread Manuel Ortiz
Hi Wofgang: Thank youvery much for your response. I was replaying to Mauricio when your email has arrived. I hope the test case is useful. Best regards, Manuel Ortiz. 2011/3/31 Wolfgang Laun > Manuel, > > I have reported this (or a very similar) problem > https://issues.jboss.org/browse/JBRU

Re: [rules-users] New in Drools, java.lang.NullPointerException at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)

2011-03-31 Thread Manuel Ortiz
Hello, Mauricio: I've been trying to reduce the set of rules and facts as well as the condition elements to provide you a manageable example and this is the minimal set of rules that still shows the NullPointerException behaviour. I also attach a basic DroolsTest.java class which can be executed w

Re: [rules-users] New in Drools, java.lang.NullPointerException at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:967)

2011-03-31 Thread Wolfgang Laun
Manuel, I have reported this (or a very similar) problem https://issues.jboss.org/browse/JBRULES-2887 with a small example to reproduce. The stack trace is not identical, so please try to reproduce this with a small test case; it is bound to happen with a rule (Test Negativo Alarma Acceso Portal

Re: [rules-users] execute particular rules programmatically and dynamically

2011-03-31 Thread Wolfgang Laun
On 31 March 2011 07:58, Benson Fung wrote: > Hi, > > If there are 10 rules in the drools rulebase, and right now I would > like to execute one of the particular rule. Is there any approach/way > to execute particular rule programmatically? No. The right hand side of a rule (code between "then"