[rules-users] pattern / tag is not working in rule file
Hello all I am using Drools 4.0.3 I am using a .xml rule file in my application in which I am validating the user entered data through my rule file. When I am not using pattern / tag in my rule file then it is working fine but when I use it ,the rules are not firing even it is not showing any exception also. For your reference I am coping my rule file below : ?xml version=1.0 encoding=UTF-8 ? package xmlns=http://drools.org/drools-4.0; xmlns:xs=http://www.w3.org/2001/XMLSchema-instance; name=jbossrules xs:schemaLocation=http://drools.org/drools-4.0 drools-4.0.xsd import name=com.wipro.evalidator.response.bean.ResponseBean / global identifier=response type=com.wipro.evalidator.response.bean.ResponseBean / import name=java.lang.* / import name=com.wipro.airline.SearchBean / rule name=rule1 rule-attribute name=agenda-group value=AirlineApp / rule-attribute name=activation-group value=activation_1195126928297 / lhs pattern identifier=searchbean object-type=com.wipro.airline.SearchBean / evaltrue/eval /lhs rhs System.out.println(date is not valid.);response.setStatus(failure);response.setSubStatus(date_notva lid); /rhs /rule /package If pattern / tag is not allowed here then how can we use SearchBean fields in the lhs part of the rule. Any help will be appreciated. Regards Prateek Katiyar The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Problem with ternary and mvel
Thanks for the answer. I can move on now. And I'm going to use your function solution. V. Mark Proctor wrote: vdelbart wrote: I try in 4.0.4 it doesn't work. Nobody have an idea ? We do not currently allow any imperative code for MVEL, it is disabled. This is on purpose to enfore declarative rules - call a function to apply your imperative code. Thanks, V. vdelbart wrote: Hi, I have a problem with this simplified rule (mvel + ternary) : rule Your Third Rule dialect mvel when v:Venue() then v.activite = (v.um == null ? it's null : it's not null); end before the execution I have this fact : Venue(Type Hosp: null, activite: null, activite Hosp: null, um: null, SousVenue: null) when I execute the rule, I have : Venue(Type Hosp: null, activite: true, activite Hosp: null, um: null, SousVenue: null) Of course with dialect = java it works but I need to use mvel dialect for other reason in all of my rules. maybe somebody have a workaround for this ? Thanks, Vincent ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Problem-with-ternary-and-mvel-tp14452888p14914530.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Multiple DSL sources
Hi everybody, I was wondering whether is possible to add multiple DSL sources to a single rule package. If we look to the *PackageBuilder* methods we do not find any method which allows us to add more than one DSL source per DRL reader. I would like to be able to do something like: *package myRulePackage* *expander DSLsource1;* *expander DSLsource2;* ** *rule myMultipleDSLRule* *when* *#* *then* *#* *end* ** ** *.* ** *rule* *.* *end* Is That possible?? In case It weren't possible, Would It be any workaround to this? I guess I could workaround this using the class *DefaultExpanderResolver* but I have got no idea on the way to do it. Can You suggest me any way to do it? Does anybody have ever had the same issue? Let me know. Thank You anyway. Massi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Multiple DSL sources
Hmm... if you look in BRMSPackageBuilder in the BRMS source code, you can see you can add DSL files together (you just have one expander statement - the expander statement is for the IDE) - however, I think that may not work in eclipse to make it content assistance pick up the other DSL file. On Jan 17, 2008 6:49 PM, mmquelo massi [EMAIL PROTECTED] wrote: Hi everybody, I was wondering whether is possible to add multiple DSL sources to a single rule package. If we look to the *PackageBuilder* methods we do not find any method which allows us to add more than one DSL source per DRL reader. I would like to be able to do something like: *package myRulePackage* *expander DSLsource1;* *expander DSLsource2;* ** *rule myMultipleDSLRule* *when* *#* *then* *#* *end* ** ** *.* ** *rule* *.* *end* Is That possible?? In case It weren't possible, Would It be any workaround to this? I guess I could workaround this using the class *DefaultExpanderResolver* but I have got no idea on the way to do it. Can You suggest me any way to do it? Does anybody have ever had the same issue? Let me know. Thank You anyway. Massi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Michael D Neale home: www.michaelneale.net blog: michaelneale.blogspot.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OutOfMemory with BRMS 4.0.3
Hi Michael, I'm not at my company these days so I cannot check or make further tests. But yes, we use a rule agent and an URL to query the rule. And it happens after 1-2 days whether we use the system or not, it doesn't seem to make any difference. however, I'll check when returning, but I think it still worked after a few days, now that I have moved the BRMS to the Jboss 3.2.3 app server. thanks for trying to help me! Sophie [EMAIL PROTECTED] wrote: - To: Rules Users List rules-users@lists.jboss.org From: Michael Neale [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 01/17/2008 12:52AM Subject: Re: [rules-users] OutOfMemory with BRMS 4.0.3 Hi Sophie - how is the jboss runtime server querying this? via the rule agent (and a URL)? just trying to work out what the usage pattern is so we can reproduce it. Michael. On Jan 11, 2008 12:20 AM, [EMAIL PROTECTED] wrote: Hello, I am using Drools BRMS 4.0.3 with tomcat 5.5.25, and I get OutOfMemory exceptions in tomcat regularly. I recently changed the java option of tomcat to add -Xmx512m, but it only resulted in taking a little more time before crashing (3 days, instead of 1 before). The server has nearly no access - it's a development server which is not a lot used at the moment - and there are only a few rules, for tests, so I really don't understand this error. I'm using java 1.5.0 on a linux server. The BRMS is accessed by web, to create and deploy the rules, and queried from another tool (on the same machine but in another server: in JBoss), to insert data in a workingMemory and execute the rules from the deployed package URL. I call the dispose() method on the StatefulSession at the end of the query (but this shouldn't be linked to this error, since this is in JBoss and the OutOfMemory occurs in tomcat...). Any idea? Thanks, Sophie ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Michael D Neale home: www.michaelneale.net blog: michaelneale.blogspot.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] add/remove rules dynamically at runtime?
Hello, is it possible to add/remove rules dynamically at runtime? So that the nothing have to deployed and the server does not need to reboot. When it is possible, where is some documentation or examples about it? Thx very much ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] OutOfMemory with BRMS 4.0.3
Thanks sophie. Any oome I will investigate it just takes time to find them. I have been running some overnight tests myself today. When you get back to work if you could provide more info it would be great. If the agent is running then it polls the brms. So that could be one of the possible causes. Sent from my iPhone On 17/01/2008, at 22:44, [EMAIL PROTECTED] wrote: Hi Michael, I'm not at my company these days so I cannot check or make further tests. But yes, we use a rule agent and an URL to query the rule. And it happens after 1-2 days whether we use the system or not, it doesn't seem to make any difference. however, I'll check when returning, but I think it still worked after a few days, now that I have moved the BRMS to the Jboss 3.2.3 app server. thanks for trying to help me! Sophie [EMAIL PROTECTED] wrote: - To: Rules Users List rules-users@lists.jboss.org From: Michael Neale [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 01/17/2008 12:52AM Subject: Re: [rules-users] OutOfMemory with BRMS 4.0.3 Hi Sophie - how is the jboss runtime server querying this? via the rule agent (and a URL)? just trying to work out what the usage pattern is so we can reproduce it. Michael. On Jan 11, 2008 12:20 AM, [EMAIL PROTECTED] wrote: Hello, I am using Drools BRMS 4.0.3 with tomcat 5.5.25, and I get OutOfMemory exceptions in tomcat regularly. I recently changed the java option of tomcat to add -Xmx512m, but it only resulted in taking a little more time before crashing (3 days, instead of 1 before). The server has nearly no access - it's a development server which is not a lot used at the moment - and there are only a few rules, for tests, so I really don't understand this error. I'm using java 1.5.0 on a linux server. The BRMS is accessed by web, to create and deploy the rules, and queried from another tool (on the same machine but in another server: in JBoss), to insert data in a workingMemory and execute the rules from the deployed package URL. I call the dispose() method on the StatefulSession at the end of the query (but this shouldn't be linked to this error, since this is in JBoss and the OutOfMemory occurs in tomcat...). Any idea? Thanks, Sophie ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Michael D Neale home: www.michaelneale.net blog: michaelneale.blogspot.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] JBRMS 4.0.4 issues
Hi peeps, After we received a couple of feedbacks about 4.0.4 drools-jbrms, I did some tests against JBoss 4.2.2 and Tomcat 6.0.x and I have a resolution workaround please check http://wiki.jboss.org/wiki/Wiki.jsp?page=JBRMSjsfdependenciesfor further explanations I'm waiting your feedbacks about this problem Thanks -- Fernando Meyer http://fmeyer.org JBoss Rules Core Developer [EMAIL PROTECTED] ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] Uploading the fact model to the DRools BRMS
can u tell me where does the file should be, in which i have to mention the full class names in order to identify the classes by BRMS. What is the format of the file?? i don hav any idea about that file.The documentation doesnot say any thing about such file.Im trying to get the classes imported but still couldnt get it. Thanx in advance Anstis, Michael (M.) wrote: I have a vague recollection that there is another file in which you need to list your fully qualified class names before they can be referenced by the BRMS. I think Kris (or Edson) has provided a posting to the group before about this. Flame me if I am wrong. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor Sent: 10 January 2008 15:54 To: Rules Users List Subject: Re: [rules-users] Uploading the fact model to the DRools BRMS Akila Geethal wrote: When I upload a jar file to the DRools BRMS it does not get uploaded. When i try to get the clsses by the import statements it says the class cannot be found. Are there any special way of making the jar?Should that fact modelapplication include special libraries or etc No it' just a standard jar, with standard pojos. _ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Uploading-the-fact-model-to-the-DRools-BRMS-tp14731528p14946844.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Uploading the fact model to the DRools BRMS
in this link http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html/index.html Read Section 9.4.4 about property file. Place This file in your jar with yours Imported class. Make changes accordingly in your program with rule agent. all the Best Rahul Upadhyay On Jan 18, 2008 10:41 AM, akilageethal [EMAIL PROTECTED] wrote: can u tell me where does the file should be, in which i have to mention the full class names in order to identify the classes by BRMS. What is the format of the file?? i don hav any idea about that file.The documentation doesnot say any thing about such file.Im trying to get the classes imported but still couldnt get it. Thanx in advance Anstis, Michael (M.) wrote: I have a vague recollection that there is another file in which you need to list your fully qualified class names before they can be referenced by the BRMS. I think Kris (or Edson) has provided a posting to the group before about this. Flame me if I am wrong. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor Sent: 10 January 2008 15:54 To: Rules Users List Subject: Re: [rules-users] Uploading the fact model to the DRools BRMS Akila Geethal wrote: When I upload a jar file to the DRools BRMS it does not get uploaded. When i try to get the clsses by the import statements it says the class cannot be found. Are there any special way of making the jar?Should that fact modelapplication include special libraries or etc No it' just a standard jar, with standard pojos. _ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Uploading-the-fact-model-to-the-DRools-BRMS-tp14731528p14946844.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Uploading the fact model to the DRools BRMS
thats is not my problem..In the brms in the web interface im having problems to get the facts. Iam not yet dealing with application.I just want to create some rules in the web interface with the uploaded jar. in here when i try to edit package configuration and put the import statements im gettng that error.When try to create rules it does not show me any facts types to add conditions.. On Jan 18, 2008 10:57 AM, Rahul Upadhyay [EMAIL PROTECTED] wrote: in this link http://downloads.jboss.com/drools/docs/4.0.3.15993.GA/html/index.html Read Section 9.4.4 about property file. Place This file in your jar with yours Imported class. Make changes accordingly in your program with rule agent. all the Best Rahul Upadhyay On Jan 18, 2008 10:41 AM, akilageethal [EMAIL PROTECTED] wrote: can u tell me where does the file should be, in which i have to mention the full class names in order to identify the classes by BRMS. What is the format of the file?? i don hav any idea about that file.Thedocumentation doesnot say any thing about such file.Im trying to get the classes imported but still couldnt get it. Thanx in advance Anstis, Michael (M.) wrote: I have a vague recollection that there is another file in which you need to list your fully qualified class names before they can be referenced by the BRMS. I think Kris (or Edson) has provided a posting to the group before about this. Flame me if I am wrong. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Mark Proctor Sent: 10 January 2008 15:54 To: Rules Users List Subject: Re: [rules-users] Uploading the fact model to the DRools BRMS Akila Geethal wrote: When I upload a jar file to the DRools BRMS it does not get uploaded. When i try to get the clsses by the import statements it says the class cannot be found. Are there any special way of making the jar?Should that fact modelapplication include special libraries or etc No it' just a standard jar, with standard pojos. _ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Uploading-the-fact-model-to-the-DRools-BRMS-tp14731528p14946844.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] BRMS Insurance Sample - InvalidClassException
Folks, I'm working through the BRMS insurance example (the very last section in the Drools documentation). I can build ( the example) and deploy both it and the BRMS ok. I import the repository , rebuild the snapshot binaries (BRMS), then hit the 'Continue' button on the drools insurance I get the InvalidClassException (below). I remember testing this for Edson and Ferando a couple of months back, so it could be something stupid that I'm doing. I'm running JBoss 4.2.1 , Java 1.6.0_03 on Windows Vista. I'm currently using BRMS 4.0.4 , with the insurance example from the Trunk (4.1.0 Snapshot), Other things I've tried: 1) All combinations of latest stable 4.0.4 and Trunk (including the obvious 4.0.4 for both, and the snapshot for both) 2) I've extracted the fact classes from the insurance war, made a standalone jar, and imported these into the BRMS 3) I've check the URL that the Insurance example uses, and modified it to take ' /LATEST'. Michael (thanks for the earlier suggestion) : Is this (number 2) what you meant by updating the Jars? Any other suggestions that I can try? Thanks Paul 07:18:44,174 ERROR [STDERR] java.io.InvalidClassException: org.drools.base.BaseEvaluator; local class incompatible: stre am classdesc serialVersionUID = -8775766726376324603, local class serialVersionUID = 6904653022187134940 07:18:44,174 ERROR [STDERR] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,190 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) 07:18:44,205 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) 07:18:44,205 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) 07:18:44,205 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,205 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) 07:18:44,221 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) 07:18:44,221 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) 07:18:44,221 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,221 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) 07:18:44,221 ERROR [STDERR] at java.util.ArrayList.readObject(ArrayList.java:593) 07:18:44,221 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 07:18:44,221 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 07:18:44,236 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 07:18:44,236 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597) 07:18:44,236 ERROR [STDERR] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) 07:18:44,236 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846) 07:18:44,236 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,252 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) 07:18:44,268 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) 07:18:44,268 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) 07:18:44,268 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) 07:18:44,283 ERROR [STDERR] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) 07:18:44,283 ERROR [STDERR] at