Re: [rules-users] No Such Field Error:DESCR in implementing ChangeSet

2012-01-10 Thread srinivasasanda
I got succeeded..There is problem in Drools Jars of different versions. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/No-Such-Field-Error-DESCR-in-implementing-ChangeSet-tp3649736p3649848.html Sent from the Drools: User forum mailing list archive at Nabble.com. __

[rules-users] Unable to do Guvnor Authentiation with MySQL

2012-01-10 Thread Sumeet Karawal
Hi, Has anybody encountered the similar problem, could someone please help me on this. TIA, Sumeet Mailto: sumeet.kara...@tcs.com - Forwarded by Sumeet Karawal/MUM/TCS on 01/11/2012 05:16 PM -

[rules-users] No Such Field Error:DESCR in implementing ChangeSet

2012-01-10 Thread srinivasasanda
Hi, I'm trying to implement CHANGESET.xml functinlaity through some example.Here is my code KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); //kbuilder.add(ResourceFactory.newUrlResource("file:d:\\rulestest\\changeset.xml"), ResourceType.CHANGE_SET); kbuilder.add(Resour

Re: [rules-users] Large number of rules in Drools

2012-01-10 Thread Shweta1986
I can look into the solution of writing my own Java application for this solution. But I would still like to understand, if the problem is just because of the 3 values being checked in the rules ? Do complex rules dont have more than 1 checks ? If yes then this case should be supported no matter ho

Re: [rules-users] Large number of rules in Drools

2012-01-10 Thread Wolfgang Laun
Assuming that the remaining 19998 rules are of the same kind, there is a lot of data in these rules, and only very little logic. Ignoring the issue of "Olympia" being one of the cities not being "Seattle", we have the problem of matching a triplet of from a Student fact so that we can store one or

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Davide Sottara
Did you remember to bind $item to some expression in the LHS ? Maybe you just called that "item" without the $ :) Davide (the original "modify" syntax is still wrong anyway) -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-For-loop-inside-a-modify-block-problem-tp36

Re: [rules-users] Large number of rules in Drools

2012-01-10 Thread Shweta1986
My rules are as follows. rule "rule1" salience -2 dialect "mvel" when stud : Student ( field == "ARTS", state.equals("WA")) then java.util.List subList = new java.util.ArrayList(); Subject subject = new Subject(); subject.setName("ABC"); subject.setFees(33454);

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Mauricio Salatino
what is this doing: for (int i = 0; i < $item.quantity; i++) { $gsc.doSomethingElse($item.id); } "i" is not being used inside the $gsc.doSomethingElse($item.id); sentence.. that means that you are executing that always with the same parameter.. do you really need that? By the way

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Martin A
Strangely, after making the changes, that 'for' loop makes the Drools engine to come up with the same error (no such identifier). I commented the loop and it does not throw that error. Any ideas why this happens? Thanks On Tue, Jan 10, 2012 at 9:04 PM, Martin A wrote: > Hi, Mauricio, > > Than

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Martin A
Hi, Mauricio, Thanks for the help.. but what do you mean by ' that loop is not doing anything ' Regards, Martin On Tue, Jan 10, 2012 at 8:59 PM, Mauricio Salatino wrote: > yeah.. sort of.. > you can do > > $gsc.doSomething($item.id); > for (int i = 0; i < $item.quantity; i++) { >

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Mauricio Salatino
yeah.. sort of.. you can do $gsc.doSomething($item.id);   for (int i = 0; i < $item.quantity; i++) {            $gsc.doSomethingElse($item.id);   } update($gsc); but by the way.. that loop is not doing anything .. 2012/1/10 Martin A : > Hello, > > I suppose that means something like: > >      

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Martin A
Hello, I suppose that means something like: modify ($gsc) { doSomething($item.id); } for (int i = 0; i < $item.quantity; i++) { $gsc.doSomethingElse($item.id); } update($gsc); Thanks, Martin 2012/1/10 Wolfgang Laun > No can do,

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Wolfgang Laun
No can do, because within a modify block a comma-separated list of (setter) method calls of the object between the parentheses must be written. Note that you can change a fact (without a modify statement) - just follow this with an update call. See the Expert manual for details. -W 2012/1/10 M

Re: [rules-users] For loop inside a modify block problem

2012-01-10 Thread Mauricio Salatino
You just need to do the loop outside the modify block and then just update the object. Cheers 2012/1/10 Martin A : > Hello, guys, > > I have the following snippet of a right side rule: > > >         modify ($gsc) { >             doSomething($item.id); > >             for (int i = 0; i < $item.quan

[rules-users] For loop inside a modify block problem

2012-01-10 Thread Martin A
Hello, guys, I have the following snippet of a right side rule: modify ($gsc) { doSomething($item.id); for (int i = 0; i < $item.quantity; i++) { doSomethingElse($item.id); } } which looks like is invalid syntax in some way, b

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread Mauricio Salatino
:) It took me almost two days following bad leads.. We definitely need to improve how those configurations are loaded by default.. and if they are not there we should not have an NPE. Cheers 2012/1/10 elMateo : > Yes, mvel2 is a bundle in my framework and I add this file in META-INF. > > I find dr

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread elMateo
Yes, mvel2 is a bundle in my framework and I add this file in META-INF. I find drools.packagebuilder.conf in droos-compiler, and I copy this to my META-INF dir. And it works!! Aleluya On Tue, Jan 10, 2012 at 6:50 PM, Mauricio Salatino wrote: > Do you have the mvel2 bundle in your class

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread Mauricio Salatino
Do you have the mvel2 bundle in your class path? Did you add the file that I mention inside the META-INF dir inside your app? Cheers. 2012/1/10 elMateo : > Now, this is the trace: (it's different to the other) > > org.drools.RuntimeDroolsException: Unable to load dialect ':mvel:null' > [stderr] a

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread elMateo
Now, this is the trace: (it's different to the other) org.drools.RuntimeDroolsException: Unable to load dialect ':mvel:null' [stderr] at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:283) [stderr] at org.drools.compiler.PackageBuilderConfiguration.buil

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread Mauricio Salatino
If it works we can prove that most of the OSGI containers works in the same way :) 2012/1/10 elMateo : > Hi Mauricio, > > I'm going to test this. > > Thank you so much!! > > On Tue, Jan 10, 2012 at 6:35 PM, Mauricio Salatino > wrote: >> >> Oh.. I see what is happening here.. the Default dialects

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread elMateo
Hi Mauricio, I'm going to test this. Thank you so much!! On Tue, Jan 10, 2012 at 6:35 PM, Mauricio Salatino wrote: > Oh.. I see what is happening here.. the Default dialects and session > configurations are not being loaded by your OSGI environment :) > It took me a while to find that out so I

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread Mauricio Salatino
Oh.. I see what is happening here.. the Default dialects and session configurations are not being loaded by your OSGI environment :) It took me a while to find that out so I hope this comment helps you to save some valuable time. Solution: you need to add inside your project that is loading the rul

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread elMateo
I'm using Drools 5.4.0 Beta 1 and my DRL is the Hello World of Drools :) (all my application is the Hello World of Drools, because I'm trying to do a OSGi bundle with this application). In my OSGi framework is running drools.core, drools.compiler and knowledge-api, and others bundles. Thanks for

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread Swindells, Thomas
Looking at the stack trace, if you are on the same version as drools as me it looks like it is this line this.rule.setDialect( getDialect().getId() ); The most likely reason is your DRL isn't valid - perhaps where you are specifying the dialect, or it could be your Dependencies aren't right or s

Re: [rules-users] NullPointerException when load file rules

2012-01-10 Thread jjmartinez
Anybody can help me? I don't know why my application show these errors. Thanks in advance! -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-load-file-rules-tp3645021p3648159.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] Fresh Guvnor Install throws ClassNotFoundException

2012-01-10 Thread Mike Key
Thanks for the response Michael. I did get past the error by adding an OSGi jar to tomcat's libs. The curious thing is that I'm loading a jar from a maven build (actually an assembly with all dependencies added to the jar). The jar itself does not have this class, and if I do a mvn dependency:tr

[rules-users] Executing a subset of rules.

2012-01-10 Thread Stephen Masters
Hi folks,I'm curious on what would be best practice with regards configuring things so that only a subset of rules is evaluated in certain situations.I have a knowledge base that is designed to evaluate a whole variety of rules relating to whether a trade can be carried out. I would like to generat

[rules-users] rule flow in BRMS

2012-01-10 Thread kachaps4u
I tried to upload the rule flow(.rf) which i created in IDE inside BRMS. But its blank in the editor?? any advise will be helpful. thank you. -- View this message in context: http://drools.46999.n3.nabble.com/rule-flow-in-BRMS-tp3647810p3647810.html Sent from the Drools: User forum mailing list a

Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2012-01-10 Thread Barry Knapp
I've seen similar issues and addressed it by overriding ChainedProperties.getResources with a map to hold the enumeration once it is found rather than constantly going back to the classloader- Map> resourceMap = new TreeMap>(); private Enumeration getResources(String name, ClassLo

[rules-users] Unable to execute BPMN2.0 process in Eclipse

2012-01-10 Thread Manohar Kokkula
Hi All, Now I appoached other way, I am using Drool-5.2.0 final, Guvnor 5.2.0 final and designer-2.0-jboss.war in Drools-Guvnor.In Designer, I created simple process and copied into eclipse through Guvnor repository. When I am trying executed this bpmn2.0 process in Eclipse, I got following ex

Re: [rules-users] MVEL curly braces position - bug or feature?

2012-01-10 Thread Wolfgang Laun
You can create the same effect using while(...) {} or do {} while( ... ); or for(;;) {} You can't do it with switch(){} because that's not accepted at all. -W 2012/1/6 Edson Tirelli > >Looks like a bug. MVEL does ; injection in order to make ; optional, so > my guess is t

[rules-users] Gwt Console in JBPM

2012-01-10 Thread srinivasasanda
Hi, I'm using JBPM5.1 installer,with JBOSS 5.1.0GA,Drools 5.3 I'm integrating Drools with JBPM.Before that,this is issue arised with JBPM5.I've dowloaded the source code for jbpm console in *https://github.com/bpmc/bpm-console*.I followed instructions and succesfuly made 2 war files gwt-console.w

Re: [rules-users] Template Key in DSL

2012-01-10 Thread FrankVhh
Hi, laune wrote > > As much as I like source code generators, I must confess that I've come to > dislike the generation of many almost identical chunks, e.g., varying only > in literals. > Imho, that would be a case to put in a decision table. laune wrote > > This means that using templates

Re: [rules-users] Template Key in DSL

2012-01-10 Thread Michael Anstis
I still think, in my opinion, it is worthwhile adding the ability to define Template Keys in DSL in Guvnor. A simple (contrived and incomplete example) DSL might be:- [when] There is an insurance policy quote=$p : PolicyQuote( ) [when] Number of previous claims on policy is between {min} and {max

Re: [rules-users] Template Key in DSL

2012-01-10 Thread Wolfgang Laun
Hi Frank, thanks for your follow-up. As much as I like source code generators, I must confess that I've come to dislike the generation of many almost identical chunks, e.g., varying only in literals. This means that using templates without an "if" in the available macro language is a "weak" tool

Re: [rules-users] Fresh Guvnor Install throws ClassNotFoundException

2012-01-10 Thread Michael Anstis
Guvnor doesn't use OSGi. The stack trace suggests the JAR you are has a dependency on OSGi:- org.drools.guvnor.server.contenthandler.ModelContentHandler.getImportsFromJar. The remainder of the stack trace relates to trying to load the imported class. 2012/1/9 Mike Key > Hi all, > > I have ins