Re: [rules-users] how to move a repository from derby database to Oracle Database
This doesn't tell me much. Maybe there's more in the log? - Truncated. see log file for complete stacktrace This might help as well. http://www.ibm.com/developerworks/forums/thread.jspa?threadID=103468 One more thought - you have provided the Oracle driver to your app server, right? vadlam wrote: after I delete repository,,version ,workspaces directories and delete all tables in the database and startweblogic again, I get the following error. Apr 29, 2010 11:35:10 AM MST Warning HTTP BEA-101162 User defined listener org.jboss.seam.servlet.SeamListener failed : org.jboss.seam.InstantiationException: Could not instantiate Seam component: repositoryConfiguration. org.jboss.seam.InstantiationException: Could not instantiate Seam component: repositoryConfiguration at org.jboss.seam.Component.newInstance(Component.java:2066) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:727) Truncated. see log file for complete stacktrace java.lang.ClassCastException: org.apache.xalan.processor.TransformerFactoryImpl at javax.xml.transform.TransformerFactory.newInstance(Unknown Source) at org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530) at org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591) at org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335) at org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142) Truncated. see log file for complete stacktrace ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules problem
hello all plz reply to my question .. On 4/29/10, Puneet duggal duggalpu...@gmail.com wrote: hi all, I am new to drool business rules , i have a web application in which i have 100 rules so i want to know which rules are going to be executed based on the facts i suppilied . my drl files is loaded at run time from database. thanks ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules problem
You can add something like rule rulename when ... then System.out.println(rulename); end in the thenclause. 2010/4/30 Puneet duggal duggalpu...@gmail.com hello all plz reply to my question .. On 4/29/10, Puneet duggal duggalpu...@gmail.com wrote: hi all, I am new to drool business rules , i have a web application in which i have 100 rules so i want to know which rules are going to be executed based on the facts i suppilied . my drl files is loaded at run time from database. thanks ___ 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] RuleAgent in webservice
Hi All, I am using drools API, and developed a webservice out of it. I created rule binary package using BRMS Guvnor. I used RuleAgent to acces the properties file. ie RuleAgent agent = RuleAgent.newRuleAgent(/ application.properties); application.properties file was stored in current working directory. I executed my application using eclipse, it was fine . For testing purpose i deployed the application in tomcat application server. Now it is unable to find application.properties file. and shows following in catalina.out file: java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.drools.agent.RuleAgent.loadFromProperties(RuleAgent.java:299) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256) My question is, in which location should i keep the application.properties file , so that RuleAgent can access it. Could you please tell me the solution. Thanks Regards Shekhar ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules problem
Hi , you can add the following line to the RHS of your rules: drools.getRule().getName() This returns the name of the rule. Note: As the RHS is executed only when the conditions in the LHS are met (satisfied), you can get the name(s) of the rule(s) that are fired. Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: Antonio Neto antoniosouzan...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/30/2010 02:20 PM Subject:Re: [rules-users] rules problem Sent by:rules-users-boun...@lists.jboss.org You can add something like rule rulename when ... then System.out.println(rulename); end in the thenclause. 2010/4/30 Puneet duggal duggalpu...@gmail.com hello all plz reply to my question .. On 4/29/10, Puneet duggal duggalpu...@gmail.com wrote: hi all, I am new to drool business rules , i have a web application in which i have 100 rules so i want to know which rules are going to be executed based on the facts i suppilied . my drl files is loaded at run time from database. thanks ___ 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 =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] RuleAgent in webservice
Hi, I had also faced the same problem. Use the below code, it works proeprly. Properties properties = new Properties(); InputStream stream = DiscountCheckServlet.class.getResourceAsStream (mention your properties file here); properties.load(stream); RuleAgent agent = RuleAgent.newRuleAgent(properties); Please let me know if it works. Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: shekharputtur puttur shekharput...@gmail.com To: rules-users@lists.jboss.org Date: 04/30/2010 02:29 PM Subject:[rules-users] RuleAgent in webservice Sent by:rules-users-boun...@lists.jboss.org Hi All, I am using drools API, and developed a webservice out of it. I created rule binary package using BRMS Guvnor. I used RuleAgent to acces the properties file. ie RuleAgent agent = RuleAgent.newRuleAgent(/ application.properties); application.properties file was stored in current working directory. I executed my application using eclipse, it was fine . For testing purpose i deployed the application in tomcat application server. Now it is unable to find application.properties file. and shows following in catalina.out file: java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.drools.agent.RuleAgent.loadFromProperties (RuleAgent.java:299) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256) My question is, in which location should i keep the application.properties file , so that RuleAgent can access it. Could you please tell me the solution. Thanks Regards Shekhar___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] RuleAgent in webservice
Try putting your .properties file inside WEB-INF/classes folder of your context. Regards, Rajnikant Gupta http://rkthinks.wordpress.com/ On Fri, Apr 30, 2010 at 2:35 PM, Gayatri Chandak gayatri.chan...@tcs.comwrote: Hi, I had also faced the same problem. Use the below code, it works proeprly. Properties properties = new Properties(); InputStream stream = DiscountCheckServlet.class.getResourceAsStream (mention your properties file here); properties.load(stream); RuleAgent agent = RuleAgent.newRuleAgent(properties); Please let me know if it works. Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: shekharputtur puttur shekharput...@gmail.com To: rules-users@lists.jboss.org Date: 04/30/2010 02:29 PM Subject:[rules-users] RuleAgent in webservice Sent by:rules-users-boun...@lists.jboss.org Hi All, I am using drools API, and developed a webservice out of it. I created rule binary package using BRMS Guvnor. I used RuleAgent to acces the properties file. ie RuleAgent agent = RuleAgent.newRuleAgent(/ application.properties); application.properties file was stored in current working directory. I executed my application using eclipse, it was fine . For testing purpose i deployed the application in tomcat application server. Now it is unable to find application.properties file. and shows following in catalina.out file: java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:418) at java.util.Properties.load0(Properties.java:337) at java.util.Properties.load(Properties.java:325) at org.drools.agent.RuleAgent.loadFromProperties (RuleAgent.java:299) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:256) My question is, in which location should i keep the application.properties file , so that RuleAgent can access it. Could you please tell me the solution. Thanks Regards Shekhar___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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] rules problem
thanks frnds for ur reply frnd actually im making rule like this rule Square_Foot_Calculation_Rule1_01-02-10_01-28-13 date-effective 02-Jan-2010 date-expires 28-Jan-2013 salience 0 no-loop true when objectP2483 : Para_2483(fid2338=4 fid2327==1 ); then objectP2483.setFid31003(objectP2483.getEid2162()); end can u tell me what is this objectP2483 ?? where this object is created ?? And i want to know the rule which are going to execute prior of execution...i.e before calling execute() method ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules problem
thanks Gayatri for ur reply actually im making rule like this rule Square_Foot_Calculation_Rule1_01-02-10_01-28-13 date-effective 02-Jan-2010 date-expires 28-Jan-2013 salience 0 no-loop true when objectP2483 : Para_2483(fid2338=4 fid2327==1 ); then objectP2483.setFid31003(objectP2483.getEid2162()); end can u tell me what is this objectP2483 ?? where this object is created ?? And i want to know the rule which are going to execute prior of execution...i.e before calling execute() method On 4/30/10, Gayatri Chandak gayatri.chan...@tcs.com wrote: Hi , you can add the following line to the RHS of your rules: drools.getRule().getName() This returns the name of the rule. Note: As the RHS is executed only when the conditions in the LHS are met (satisfied), you can get the name(s) of the rule(s) that are fired. Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: Antonio Neto antoniosouzan...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/30/2010 02:20 PM Subject:Re: [rules-users] rules problem Sent by:rules-users-boun...@lists.jboss.org You can add something like rule rulename when ... then System.out.println(rulename); end in the thenclause. 2010/4/30 Puneet duggal duggalpu...@gmail.com hello all plz reply to my question .. On 4/29/10, Puneet duggal duggalpu...@gmail.com wrote: hi all, I am new to drool business rules , i have a web application in which i have 100 rules so i want to know which rules are going to be executed based on the facts i suppilied . my drl files is loaded at run time from database. thanks ___ 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 =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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] rules problem
Hi, if you have a POJO say PersonDetails as: public class PersonDetails { String name; String age; String sex; String desg; public String getDesg() { return desg; } public void setDesg(String desg) { this.desg = desg; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } } Then in the rule file you should write as: rule rule1 when objectPerson : PersonDetails ( conditions are placed here ) then rhs end So, objectP2483 is the object of your Fact (POJO). Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: Puneet duggal duggalpu...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/30/2010 03:11 PM Subject:Re: [rules-users] rules problem Sent by:rules-users-boun...@lists.jboss.org thanks frnds for ur reply frnd actually im making rule like this rule Square_Foot_Calculation_Rule1_01-02-10_01-28-13 date-effective 02-Jan-2010 date-expires 28-Jan-2013 salience 0 no-loop true when objectP2483 : Para_2483(fid2338=4 fid2327==1 ); then objectP2483.setFid31003(objectP2483.getEid2162()); end can u tell me what is this objectP2483 ?? where this object is created ?? And i want to know the rule which are going to execute prior of execution...i.e before calling execute() method ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules problem
thanks a lot gayatri for ur prompt reply i am confused that when and where is objectPerson or objectP2483 is defined and created and how and when its decided that which all rules are to be fired .How can i know all this before calling the execute method thanks... Puneet Duggal On 4/30/10, Gayatri Chandak gayatri.chan...@tcs.com wrote: Hi, if you have a POJO say PersonDetails as: public class PersonDetails { String name; String age; String sex; String desg; public String getDesg() { return desg; } public void setDesg(String desg) { this.desg = desg; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } } Then in the rule file you should write as: rule rule1 when objectPerson : PersonDetails ( conditions are placed here ) then rhs end So, objectP2483 is the object of your Fact (POJO). Regards, Gayatri Chandak TEG-Open Source Tata Consultancy Services Yantra Park -(STPI) 2nd Pokharan Road, Opp HRD Voltas Center,Subash Nagar Mumbai - 400 601,Maharashtra India Ph:- 022-67782556 Mailto: gayatri.chan...@tcs.com Website: http://www.tcs.com Experience certainty. IT Services Business Solutions Outsourcing From: Puneet duggal duggalpu...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/30/2010 03:11 PM Subject:Re: [rules-users] rules problem Sent by:rules-users-boun...@lists.jboss.org thanks frnds for ur reply frnd actually im making rule like this rule Square_Foot_Calculation_Rule1_01-02-10_01-28-13 date-effective 02-Jan-2010 date-expires 28-Jan-2013 salience 0 no-loop true when objectP2483 : Para_2483(fid2338=4 fid2327==1 ); then objectP2483.setFid31003(objectP2483.getEid2162()); end can u tell me what is this objectP2483 ?? where this object is created ?? And i want to know the rule which are going to execute prior of execution...i.e before calling execute() method ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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] Flow - handling multiple events of the same kind
If the same event-node is triggered twice with different data, the same variable will be recycled for the different data payloads. How does one ensure that data is not lost? My best guess is to follow the event node with a composite node, and copy the top-level variables into the composite's variable scope in the first sub-node of the composite. But I'm not sure whether I can guarantee that the composite will be able to do that before the engine handles the second event. Suggestions? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multiple-events-of-the-same-kind-tp767773p767773.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] ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory
Paul, I believe this is related to a problem I fixed in trunk a couple weeks ago. Can you please test trunk and let me know if the problem persists? Thank you, Edson 2010/4/29 Paul Ryan pr...@infotrustgroup.com Hi all, We're receiving some error messages that we don't understand from rules that had conditionals that worked and now don't (no upgrade or anything like that, they just stopped working), any clues as to what kinds of things to look for when we get an error like the following? (if not we can try to pair down to an a test case) org.drools.runtime.rule.ConsequenceException: java.lang.ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627) at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183) at com.infotrustgroup.rules.engine.RulesManager.runRules(RulesManager.java:353) at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:406) at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:370) at com.infotrustgroup.util.rules.RuleRunner.run(RuleRunner.java:395) at com.infotrustgroup.util.rules.RuleRunner.call(RuleRunner.java:193) at com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner.runRules(EditionsRulesJobRunner.java:87) Caused by: java.lang.ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory at org.drools.reteoo.EvalConditionNode.retractLeftTuple(EvalConditionNode.java:199) at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:159) at org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:68) at org.drools.reteoo.JoinNode.retractLeftTuple(JoinNode.java:231) at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:239) at org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:195) at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1416) at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1360) at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:141) at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:154) at com.infotrustgroup.what.Rule_Transform_SGML_to_XML_0.consequence(Rule_Transform_SGML_to_XML_0.java:48) at com.infotrustgroup.what.Rule_Transform_SGML_to_XML_0ConsequenceInvoker.evaluate(Rule_Transform_SGML_to_XML_0ConsequenceInvoker.java:34) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934) ... 11 more Thanks in advance for your help with this, -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development JBoss by Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] rules not wrking
frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules not wrking
thanks for ur reply friend, can u tell me how to use eval() and in which class do i have to put my function which i have to call it from eval() function On 4/30/10, Esteban Aliverti esteban.alive...@gmail.com wrote: You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ 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] Drools + ETL Process
Hi Esteban, Sorry, I have only one week looking into Drools =) Yes, I am talking about Drools Expert Database Looking into this http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/persistence/jpa/JPAKnowledgeService.html I tried a sample snippet http://pastebin.com/uJd5642D But its incomplete, for example, I need to create the Rule in the database also The things that I need to do are: 1) Create Rule and Object Facts in Java and persist them in the Drools Expert Database 2) Check in the Guvnor Interface the Rules and Facts created in the step before 2) Fire the Rules created and get the response Is there someone that have experience using JPA persistence with Drools? I already have a simple project configured using JPA and Hibernate but I still don't know how to proceed =( Thanks In Advance ! -Original Message- From: Esteban Aliverti esteban.alive...@gmail.com To: Rules Users List rules-users@lists.jboss.org Sent: Thu, Apr 29, 2010 9:02 pm Subject: Re: [rules-users] Drools + ETL Process Which drools database are you talking about? If you just want to use drools expert, you don't need any db. If you want to persist your kbase or rules, feel free to use whatever mechanism you want. 2010/4/28 andre.fons...@mail.com Hi all, I am using Drools 5.0 with Tomcat 6 and MySQL. Now I need to insert data in the drools database but I DON'T want to use the Guvnor interface. This is because in the future we'll need to use a kind of ETL process to populate the drools database. Should I create a java class with JDBC access and perform a SQL direct to that tables? I did the reverse engineering of the drools database but I could not understood yet where the data are persisted. Any advice should be very helpful. Thanks in advance. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ 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] Error when trying to serialize session
I'm getting the following stack when trying to serialize a session containing one running process: java.io.NotSerializableException: org.drools.workflow.instance.impl.NodeInstanceFactoryRegistry at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.drools.RuleBaseConfiguration.writeExternal(RuleBaseConfiguration.java:191) at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.drools.common.AbstractRuleBase.writeExternal(AbstractRuleBase.java:204) at org.drools.reteoo.ReteooRuleBase.writeExternal(ReteooRuleBase.java:185) at org.drools.impl.KnowledgeBaseImpl.writeExternal(KnowledgeBaseImpl.java:81) at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) The call is thrown from this line of code: droolsOut.writeObject(session.getKnowledgeBase()); Is this a legitimate bug in Drools? Or is this because something in my knowledge base is not serializable? The org.drools.workflow.instance.impl.NodeInstanceFactoryRegistry is what is confusing me if this is my issue or a Drools issue. Thanks! -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-when-trying-to-serialize-session-tp768398p768398.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] how to move a repository from derby database to Oracle Database
Yes, The same driver information works when the repository directories exist. My suspicion is that this error happens when the repository directory specified in repositoryx.ml does not exist during system startup. I get the same error whether it is default derby settings or Oracle settings if Repository ,version,workspace directories do not exist. The error stack trace below is when I use the derby settings.The error message is same as when I use Oracle settings. Apr 30, 2010 9:42:10 AM MST Warning HTTP BEA-101162 User defined listener org.jboss.seam.servlet.SeamListener failed: org.jboss.seam.InstantiationException: Could not instantiate Seam component: repositoryConfiguration. org.jboss.seam.InstantiationException: Could not instantiate Seam component: repositoryConfiguration at org.jboss.seam.Component.newInstance(Component.java:2066) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:727) Truncated. see log file for complete stacktrace java.lang.ClassCastException: org.apache.xalan.processor.TransformerFactoryImpl at javax.xml.transform.TransformerFactory.newInstance(Unknown Source) at org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530) at org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591) at org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335) at org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142) Truncated. see log file for complete stacktrace Apr 30, 2010 9:42:10 AM MST Error Deployer BEA-149231 Unable to set the activation state to true for the application 'drools-guvnor'. weblogic.application.ModuleException: at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:891) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) Truncated. see log file for complete stacktrace java.lang.ClassCastException: org.apache.xalan.processor.TransformerFactoryImpl at javax.xml.transform.TransformerFactory.newInstance(Unknown Source) at org.apache.jackrabbit.core.config.RepositoryConfig.internalCreateWorkspaceConfig(RepositoryConfig.java:530) at org.apache.jackrabbit.core.config.RepositoryConfig.createWorkspaceConfig(RepositoryConfig.java:591) at org.apache.jackrabbit.core.config.RepositoryConfig.init(RepositoryConfig.java:335) at org.apache.jackrabbit.core.config.RepositoryConfig.create(RepositoryConfig.java:142) Truncated. see log file for complete stacktrace This is what is logged in derby.log file when this error happens. 2010-04-29 17:35:50.808 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-0128-4aa3-875c-0c9dabf8 on database directory C:\bea923HULA\user_projects\domains\hulaCdm_R110\config\drools\version\db Database Class Loader started - derby.database.classpath='' 2010-04-29 17:35:53.995 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance e03f4017-0128-4aa3-875c-0c9dabf8 on database directory C:\bea923HULA\user_projects\domains\hulaCdm_R110\config\drools\workspaces\default\db Database Class Loader started - derby.database.classpath='' -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/how-to-move-a-repository-from-derby-database-to-Oracle-Database-tp758128p768408.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] rules not wrking
If you really wanted to see your text string there, you might be able to invoke a method that takes that text string and prints it and then returns true in all cases. You'd most likely need to put it in an Eval as suggested below. You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Good To Have: TaskClient Interface
There is MinaTaskClient and BaseTaskClient, but no TaskClient interface. That is why: public void start( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void stop( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void release( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void suspend( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void resume( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void skip( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void delegate( long taskId, String userId, String targetUserId, TaskOperationResponseHandler responseHandler ) public void complete( long taskId, String userId, ContentData outputData, TaskOperationResponseHandler responseHandler ) ... is not a reusable approach (to get rid of Mina, and use something else [ JMS, DB, etc.. ] ). I think it would make sense to create an interface defining the contract, and program to that interface. Am I missing something? Thank you, /Anatoly P.S. I know the whole approach is going to change to be pluggable in the near future, but I find it strange there is no contract/interface that defines a task lifecycle. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Good-To-Have-TaskClient-Interface-tp768836p768836.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] Good To Have: TaskClient Interface
wait for two weeks and you will see it there in the trunk! at that point feedback will be appreciated! Probably the task client interface should provide less methods, some basic ones and then we can have a WSHTClient Interface to support all the methods from the spec. On Fri, Apr 30, 2010 at 4:40 PM, tolitius webaka...@gmail.com wrote: There is MinaTaskClient and BaseTaskClient, but no TaskClient interface. That is why: public void start( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void stop( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void release( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void suspend( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void resume( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void skip( long taskId, String userId, TaskOperationResponseHandler responseHandler ) public void delegate( long taskId, String userId, String targetUserId, TaskOperationResponseHandler responseHandler ) public void complete( long taskId, String userId, ContentData outputData, TaskOperationResponseHandler responseHandler ) ... is not a reusable approach (to get rid of Mina, and use something else [ JMS, DB, etc.. ] ). I think it would make sense to create an interface defining the contract, and program to that interface. Am I missing something? Thank you, /Anatoly P.S. I know the whole approach is going to change to be pluggable in the near future, but I find it strange there is no contract/interface that defines a task lifecycle. -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Good-To-Have-TaskClient-Interface-tp768836p768836.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 -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools + ETL Process
Hi man, you are mixing a lot of stuff here.. I will recommend you the following steps for achieving the steps that you are mentioning 1) Install guvnor 2) author the rules inside it.. (it already contains a JCR repository, that is similar to a database, it will allow you to store rules there), you can also author some objects (fact model) inside guvnor. 3) Then you can create tests to execute the rules and see which rules are fired. Greetings, hope it helps! 2010/4/30 andre.fons...@mail.com Hi Esteban, Sorry, I have only one week looking into Drools =) Yes, I am talking about Drools Expert Database Looking into this http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/apidocs/org/drools/persistence/jpa/JPAKnowledgeService.htmlI tried a sample snippet http://pastebin.com/uJd5642D But its incomplete, for example, I need to create the Rule in the database also The things that I need to do are: 1) Create Rule and Object Facts in Java and persist them in the Drools Expert Database 2) Check in the Guvnor Interface the Rules and Facts created in the step before 2) Fire the Rules created and get the response Is there someone that have experience using JPA persistence with Drools? I already have a simple project configured using JPA and Hibernate but I still don't know how to proceed =( Thanks In Advance ! -Original Message- From: Esteban Aliverti esteban.alive...@gmail.com To: Rules Users List rules-users@lists.jboss.org Sent: Thu, Apr 29, 2010 9:02 pm Subject: Re: [rules-users] Drools + ETL Process Which drools database are you talking about? If you just want to use drools expert, you don't need any db. If you want to persist your kbase or rules, feel free to use whatever mechanism you want. 2010/4/28 andre.fons...@mail.com Hi all, I am using Drools 5.0 with Tomcat 6 and MySQL. Now I need to insert data in the drools database but I DON'T want to use the Guvnor interface. This is because in the future we'll need to use a kind of ETL process to populate the drools database. Should I create a java class with JDBC access and perform a SQL direct to that tables? I did the reverse engineering of the drools database but I could not understood yet where the data are persisted. Any advice should be very helpful. Thanks in advance. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ 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 -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Flow - handling multiple events of the same kind
Can you give us a use case for that situation? to be able to understand the problem. Greetings. On Fri, Apr 30, 2010 at 9:03 AM, Ed Staub est...@telcordia.com wrote: If the same event-node is triggered twice with different data, the same variable will be recycled for the different data payloads. How does one ensure that data is not lost? My best guess is to follow the event node with a composite node, and copy the top-level variables into the composite's variable scope in the first sub-node of the composite. But I'm not sure whether I can guarantee that the composite will be able to do that before the engine handles the second event. Suggestions? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multiple-events-of-the-same-kind-tp767773p767773.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 -- - http://salaboy.wordpress.com - http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] rules not wrking
Please remember that rules' conditions are evaluated when you insert/modify/retract a Fact and not when you call fireAllRules(). On Fri, Apr 30, 2010 at 2:54 PM, John Peterson john.peterson.g...@statefarm.com wrote: If you really wanted to see your text string there, you might be able to invoke a method that takes that text string and prints it and then returns true in all cases. You'd most likely need to put it in an Eval as suggested below. You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Missing space when using DSL and Guvnor
Hi Jeff, I logged a bug for this one a while back, here's the JIRA, patch details included. https://jira.jboss.org/jira/browse/GUVNOR-520 I would appreciate it if somebody could commit this for me :) Cheers, Paul 2010/4/30 Esteban Aliverti esteban.alive...@gmail.com It sounds like a bug. Can you double check it and create a jira issue please? best, 2010/4/29 Doyel,Jeff jdo...@cerner.com I am setting up a very simple example using a DSL and Guvnor. My DSL is as follows: [when]Age is less than {age} years old=AgeFact(ageInYears {age}) When I attempt to create a new Business Rule using the Guvnor I can select the above expression just fine and the sentence displays as expected. I then fill in the years with a numeric value (4) and validate. Upon validation I receive the following error. [Age Test Rule] [ERR 101] Line 4:2 no viable alternative at input 'Age' in rule Age Test Rule I then view the source and it looks like this. rule Age Test Rule dialect mvel when Age is less than 4years old then end I noticed that there is no space between the ‘4’ and the word ‘years’. However, in my DSL sentence there is a space between {age} and years. Another interesting thing, if I enter the number 4 followed by a space in the Guvnor form then the rule validates correctly. Is this a bug or is it something I am doing wrong in my DSL? Thanks, Jeff -- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ 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] Missing space when using DSL and Guvnor
Hey, didn't mean to come off as critical today. You are doing a good job on this, and the basic rules stuff is spot on as far as functionality goes. Words like *refactor* and *scrub* are just artifacts of code that has gone through several revision cycles (and I helped). Functionally, it's working great, as intended, with no compromises in the design - or at least tiny ones. If the code is a little hard to modify (due to a couple of years of active maintenance), that's not a big deal. It really may be a very small deal. It looks to me like this code is about to enter a fairly stable time. It's pretty close to feature-complete, and it's working. So then it's your call if and when you want to spend the time and effort to pretty it up a bit. In a code base as big as this one, with as many things as need to be done, there's plenty of other low hanging fruit... :-) Have a good weekend, and try not to work on this stuff. Jason Smith Software Engineer InfoTrust Group, Inc. 500 Discovery Parkway, Suite 200 Superior, CO 80027 Office 303-627-6571 Fax 303-666-6711 Email jsm...@infotrustgroup.commailto:jsm...@infotrustgroup.com WEB www.infotrustgroup.comhttp://www.infotrustgroup.com/ This e-mail and all information included herein do not constitute a legal agreement accorded by INFOTRUST GROUP and its affiliates and subsidiaries. All legal agreements must be formulated in writing by a legal representative of INFOTRUST GROUP. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail by mistake, please inform us and destroy this e-mail and any documents it might contain. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, 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. Thank you for your cooperation. From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] On Behalf Of Paul R. [reverselo...@gmail.com] Sent: Friday, April 30, 2010 5:40 PM To: Rules Users List Subject: Re: [rules-users] Missing space when using DSL and Guvnor Hi Jeff, I logged a bug for this one a while back, here's the JIRA, patch details included. https://jira.jboss.org/jira/browse/GUVNOR-520 I would appreciate it if somebody could commit this for me :) Cheers, Paul 2010/4/30 Esteban Aliverti esteban.alive...@gmail.commailto:esteban.alive...@gmail.com It sounds like a bug. Can you double check it and create a jira issue please? best, 2010/4/29 Doyel,Jeff jdo...@cerner.commailto:jdo...@cerner.com I am setting up a very simple example using a DSL and Guvnor. My DSL is as follows: [when]Age is less than {age} years old=AgeFact(ageInYears {age}) When I attempt to create a new Business Rule using the Guvnor I can select the above expression just fine and the sentence displays as expected. I then fill in the years with a numeric value (4) and validate. Upon validation I receive the following error. [Age Test Rule] [ERR 101] Line 4:2 no viable alternative at input 'Age' in rule Age Test Rule I then view the source and it looks like this. rule Age Test Rule dialect mvel when Age is less than 4years old then end I noticed that there is no space between the ‘4’ and the word ‘years’. However, in my DSL sentence there is a space between {age} and years. Another interesting thing, if I enter the number 4 followed by a space in the Guvnor form then the rule validates correctly. Is this a bug or is it something I am doing wrong in my DSL? Thanks, Jeff CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org
Re: [rules-users] Missing space when using DSL and Guvnor
I would like to recall the previous message... please ignore. Big oops! Jason Smith From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] On Behalf Of Paul R. [reverselo...@gmail.com] Sent: Friday, April 30, 2010 5:40 PM To: Rules Users List Subject: Re: [rules-users] Missing space when using DSL and Guvnor Hi Jeff, I logged a bug for this one a while back, here's the JIRA, patch details included. https://jira.jboss.org/jira/browse/GUVNOR-520 I would appreciate it if somebody could commit this for me :) Cheers, Paul 2010/4/30 Esteban Aliverti esteban.alive...@gmail.commailto:esteban.alive...@gmail.com It sounds like a bug. Can you double check it and create a jira issue please? best, 2010/4/29 Doyel,Jeff jdo...@cerner.commailto:jdo...@cerner.com I am setting up a very simple example using a DSL and Guvnor. My DSL is as follows: [when]Age is less than {age} years old=AgeFact(ageInYears {age}) When I attempt to create a new Business Rule using the Guvnor I can select the above expression just fine and the sentence displays as expected. I then fill in the years with a numeric value (4) and validate. Upon validation I receive the following error. [Age Test Rule] [ERR 101] Line 4:2 no viable alternative at input 'Age' in rule Age Test Rule I then view the source and it looks like this. rule Age Test Rule dialect mvel when Age is less than 4years old then end I noticed that there is no space between the ‘4’ and the word ‘years’. However, in my DSL sentence there is a space between {age} and years. Another interesting thing, if I enter the number 4 followed by a space in the Guvnor form then the rule validates correctly. Is this a bug or is it something I am doing wrong in my DSL? Thanks, Jeff CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ rules-users mailing list rules-users@lists.jboss.orgmailto: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] rules not wrking
hi john, My rule is something like this rule Area_EstimatedRval1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when eval(BusinessLogic.gettest(inside Area_EstimatedRval1_10-01-09_12-31-14)) objectP2483 : Para_2483( (fid2329==Accessible Attic ||fid2329==Mobile Home) (fid2337==Fiberglass (Blown)) ); then System.out.println(Area_EstimatedRval1_10-01-09_12-31-14); objectP2483.setFid2339(objectP2483.getFid2338() * 2.2);update(objectP2483); end but its not going inside the BusinessLogic.gettest(inside Area_EstimatedRval1_10-01-09_12-31-14)) whats rung in this ?? On 4/30/10, John Peterson john.peterson.g...@statefarm.com wrote: If you really wanted to see your text string there, you might be able to invoke a method that takes that text string and prints it and then returns true in all cases. You'd most likely need to put it in an Eval as suggested below. You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ 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] rules not wrking
hi Esteban , My rule is something like this rule Area_EstimatedRval1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when eval(BusinessLogic.gettest(inside Area_EstimatedRval1_10-01-09_12-31-14)) objectP2483 : Para_2483( (fid2329==Accessible Attic ||fid2329==Mobile Home) (fid2337==Fiberglass (Blown)) ); then System.out.println(Area_EstimatedRval1_10-01-09_12-31-14); objectP2483.setFid2339(objectP2483.getFid2338() * 2.2);update(objectP2483); end but its not going inside the BusinessLogic.gettest(inside Area_EstimatedRval1_10-01-09_12-31-14)) whats wrong in this ?? On 5/1/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Please remember that rules' conditions are evaluated when you insert/modify/retract a Fact and not when you call fireAllRules(). On Fri, Apr 30, 2010 at 2:54 PM, John Peterson john.peterson.g...@statefarm.com wrote: If you really wanted to see your text string there, you might be able to invoke a method that takes that text string and prints it and then returns true in all cases. You'd most likely need to put it in an Eval as suggested below. You can't directly use java code inside the LHS of a rule. You can though use eval to call a java method inside your LHS. Also remember that you don't have to use ; in the patterns. 2010/4/30 Puneet duggal duggalpu...@gmail.com frnds i have a rule and its not working and i for checking i have put a Sop in my when but it not prints the Inside Area_SqFt_1_10-01-09_12-31-14 so how can we put SOP inside when clause. rule Area_SqFt_1_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when System.out.println(Inside Area_SqFt_1_10-01-09_12-31-14); objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SqFt_1_10-01-09_12-31-14); objectP2483.setFid31003(new Double(497)); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Esteban Aliverti ___ 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