Re: [rules-users] Adding .package files to a KnowledgePackage
I guess I should also mention that by default we are using the expert API's so primarily we're creating the knowledge packages using a KnowledgeBuilder. Again thanks for any light you can shed on getting files with the extension .package loaded into the knowledge base. -- Paul Ryan On Sep 11, 2012, at 4:59 PM, Paul Ryan pr...@infotrustgroup.com wrote: So drools will respect files with a .package extension as a place for declared types, functions, etc. when used with these in the class path. How can a import these into a KnowledgePackage/KnowledgeBase so they can get compiled along with stuff when this is not in the class path at startup? My use case is such that these are not in the same space and can't be loaded at startup time in most cases. Any help is greatly appreciated, -- Paul Ryan ___ 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] Adding .package files to a KnowledgePackage
So drools will respect files with a .package extension as a place for declared types, functions, etc. when used with these in the class path. How can a import these into a KnowledgePackage/KnowledgeBase so they can get compiled along with stuff when this is not in the class path at startup? My use case is such that these are not in the same space and can't be loaded at startup time in most cases. Any help is greatly appreciated, -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Eclipse plugin autocomplete
I appears autocomplete was removed in the last couple of months from the drools eclipse plugin (when the plugin was transitioned to jboss tools). This was a feature I know my team used heavily was there a reason this was summarily removed as it was working fine (reference the thread attached). http://drools.46999.n3.nabble.com/PackageDescr-getFactTemplates-td2922550.html Thanks, -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Still getting an EvalConditionNode ClassCastException
| ... 16 more INFO | 2010/07/19 17:07:29 | jvm 1| 2010-07-19 17:07:29,759 FATAL com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner:Worker service threw an unexpected exception. INFO | 2010/07/19 17:07:29 | jvm 1| org.drools.runtime.rule.ConsequenceException: java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.rules.engine.RulesManager.runRules(RulesManager.java:363) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:385) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:349) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleRunner.run(RuleRunner.java:395) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleRunner.call(RuleRunner.java:193) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner.runRules(EditionsRulesJobRunner.java:87) INFO | 2010/07/19 17:07:29 | jvm 1| Caused by: java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.reteoo.EvalConditionNode.retractLeftTuple(EvalConditionNode.java:199) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:239) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.reteoo.EntryPointNode.retractObject(EntryPointNode.java:195) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1416) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1350) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:231) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.rules.engine.RulesManager$InnerPropertyChangeListener.propertyChange(RulesManager.java:467) INFO | 2010/07/19 17:07:29 | jvm 1| at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.collections.BoundMap.put(BoundMap.java:67) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.what.Rule_Load_ATAXML_Transform_0.consequence(Rule_Load_ATAXML_Transform_0.java:28) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.what.Rule_Load_ATAXML_Transform_0ConsequenceInvoker.evaluate(Rule_Load_ATAXML_Transform_0ConsequenceInvoker.java:28) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:934) INFO | 2010/07/19 17:07:29 | jvm 1| ... 11 more Point of speculation: When looking at the latest code on trunk I would believe this is not fixed as the line pointed to here has not changed (the place where this line exists has changed but not the code see fisheye at http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/reteoo/EvalConditionNode.java?r1=23650r2=34068u=20 and where the lefthand side was 199 for 5.0.1 it is still the same code in the latest svn revision (now line 229). -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Still getting an EvalConditionNode ClassCastException
We're only seeing it on a customer customization so I'm a little hesitant to put out the SNAPSHOT to them, I will try though. Do you know what the plan is for releasing 5.1.0 or at least a 5.1.0.M3? At the very least I'll try to make a test case I can get to repeat in dev. -- Paul Ryan On Jul 20, 2010, at 12:17 PM, Edson Tirelli wrote: Paul, Did you tried trunk? The source of this problem was not in the EvalNode class itself (that is why you mention the code is still there), but on the re-use of node ids, that determine the position of the node memory in the memory array. I fixed this in trunk a few weeks ago. Give it a try and let me know if you still see any problem, but I think it is everything fine now. https://jira.jboss.org/browse/JBRULES-2312 Thanks, Edson 2010/7/20 Paul Ryan pr...@infotrustgroup.commailto:pr...@infotrustgroup.com We're still getting a class cast exception for beta and eval memory (exception below). It is a different location and the opposite direction of the exception cast from JBRULES-1719. The rule we ran was: /** * Load the smgl transform */ rule Load Transform when $fact : ParametersFact( doc != dmodule, $xml : xml != null, noopResponse == true, eval(XPathUtil.selectElement($xml,/*/transformLog//transform[name='s1000dv3'])==null), flags['loadedS1000Dv3']!=true, eval(XPathUtil.selectElement($xml,/*/transformLog//transform[name='detect']/results[result='text/xml'])!=null) ) $importUtil : RuleImportUtil() $model : EditionsRulesJobRunner(stop==false,interrupt==false) then VectorString libraries = new VectorString(); libraries.add(lib); String documentType = dmodule; String fragmentType = dmodule; $importUtil.importRules(kcontext,transformCmd,documentType,fragmentType,libraries); $fact.getFlags().put(loadedS1000Dv3,true); end The thing of consequence here is the importRules call which modifies the kcontext and acts as a dynamic include (e.g. it imports new rules). The exception received is: INFO | 2010/07/19 17:07:29 | jvm 1| 2010-07-19 17:07:29,743 INFO com.infotrustgroup.restless.server.ThreadedService:An exception was trapped in com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner INFO | 2010/07/19 17:07:29 | jvm 1| org.drools.runtime.rule.ConsequenceException: java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627) INFO | 2010/07/19 17:07:29 | jvm 1| at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.rules.engine.RulesManager.runRules(RulesManager.java:363) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:385) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleFileUtil.runRules(RuleFileUtil.java:349) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleRunner.run(RuleRunner.java:395) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.util.rules.RuleRunner.call(RuleRunner.java:193) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.jobs.services.auth.EditionsRulesJobRunner.runRules(EditionsRulesJobRunner.java:87) INFO | 2010/07/19 17:07:29 | jvm 1| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | 2010/07/19 17:07:29 | jvm 1| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) INFO | 2010/07/19 17:07:29 | jvm 1| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) INFO | 2010/07/19 17:07:29 | jvm 1| at java.lang.reflect.Method.invoke(Method.java:597) INFO | 2010/07/19 17:07:29 | jvm 1| at com.infotrustgroup.restless.server.ThreadedService.runServiceMethod(ThreadedService.java:845) INFO | 2010/07/19 17:07:29 | jvm 1| Caused by: java.lang.ClassCastException: org.drools.reteoo.BetaMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory INFO | 2010/07/19 17:07:29 | jvm 1
Re: [rules-users] ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory
Thank you Edson and no problem on the reply time I completely understand. -- Paul Ryan On May 11, 2010, at 6:27 PM, Edson Tirelli wrote: Paul, Sorry for taking long to answer but I am on vacations with limited internet connection. You can find the changeset for that fix here: https://jira.jboss.org/jira/browse/JBRULES-2465?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel https://jira.jboss.org/jira/browse/JBRULES-2465?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel Edson 2010/5/10 Paul Ryan pr...@infotrustgroup.commailto:pr...@infotrustgroup.com Edson, Any pointers here we're seeing this all over the place and it's starting to become a major problem I'm more than willing to do a merge build and test but I really need to know which thing it was that you did to try to fix this. Thank you very much, -- Paul Ryan On May 5, 2010, at 1:43 PM, Paul Ryan wrote: Any ideas what the svn commit revision was I'd like to patch our code as we're trying to get to a production state and this plus the issue reported by Jason Smith at http://drools-java-rules-engine.46999.n3.nabble.com/no-subject-tt48858.html#a48858 are holding us back. Any pointers you have here would be appreciated. As well as a review of his code for fixing the removeFactHandle issue pointed out in that thread so I can try to apply these patches and see if these issues are fixed. -- Paul Ryan On Apr 30, 2010, at 8:49 AM, Edson Tirelli wrote: 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.commailto: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
Re: [rules-users] ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory
Edson, Any pointers here we're seeing this all over the place and it's starting to become a major problem I'm more than willing to do a merge build and test but I really need to know which thing it was that you did to try to fix this. Thank you very much, -- Paul Ryan On May 5, 2010, at 1:43 PM, Paul Ryan wrote: Any ideas what the svn commit revision was I'd like to patch our code as we're trying to get to a production state and this plus the issue reported by Jason Smith at http://drools-java-rules-engine.46999.n3.nabble.com/no-subject-tt48858.html#a48858 are holding us back. Any pointers you have here would be appreciated. As well as a review of his code for fixing the removeFactHandle issue pointed out in that thread so I can try to apply these patches and see if these issues are fixed. -- Paul Ryan On Apr 30, 2010, at 8:49 AM, Edson Tirelli wrote: 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.commailto: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.orgmailto: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.comhttp://www.jboss.com/ ___ 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
Re: [rules-users] ClassCastException: org.drools.reteoo.RuleTerminalNode$TerminalNodeMemory cannot be cast to org.drools.reteoo.EvalConditionNode$EvalMemory
Any ideas what the svn commit revision was I'd like to patch our code as we're trying to get to a production state and this plus the issue reported by Jason Smith at http://drools-java-rules-engine.46999.n3.nabble.com/no-subject-tt48858.html#a48858 are holding us back. Any pointers you have here would be appreciated. As well as a review of his code for fixing the removeFactHandle issue pointed out in that thread so I can try to apply these patches and see if these issues are fixed. -- Paul Ryan On Apr 30, 2010, at 8:49 AM, Edson Tirelli wrote: 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.commailto: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.orgmailto: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.comhttp://www.jboss.com/ ___ 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
[rules-users] Map using from constraint
Hi all, Is there a way using the 'from' constraint to get the values of a map(the implementations of java.lang.Map eg HashMap, TreeMap, etc) into a constraint parameter, and if so can someone please give an example. Below is the way I've been trying, without success, to get a value based on a key. import my.package.MyFact import java.util.Map.Entry rule Find with map when $fact : MyFact($paramMap : paramMap) $myValue : Entry(key == mykey1) from $paramMap Then // Sudo code... use $myValue.getValue() end Paul Ryan Software Architect Product Engineering InfoTrust Group, Inc. [cid:image001.jpg@01C8E75E.F8448000] 500 Discovery Parkway, Suite 200 Superior, CO 80027 Office (303) 627-6528 Fax (303) 666-6711 Email [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] 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. inline: image001.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] Map using from constraint
Sorry if this is a very basic question but does that mean that I have to set the dialect for the whole rule to MVEL. I ask because using the code below with the dialect left as default fails with an error about the square brackets. However my consequence code doesn't work with the dialect set as MVEL. All this means for me is that I will probably have to stick with my eval version of key checking but I just wanted to be sure. import my.package.MyFact import java.util.Map.Entry rule Find with map when $fact : MyFact($paramMap : paramMap) $myValue : String() from $paramMap['mykey1'] then // Sudo code... use $myValue end Thank you Mark for the quick reply, -- Paul Ryan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor Sent: Wednesday, July 16, 2008 4:29 PM To: Rules Users List Subject: Re: [rules-users] Map using from constraint Paul Ryan wrote: Hi all, Is there a way using the 'from' constraint to get the values of a map(the implementations of java.lang.Map eg HashMap, TreeMap, etc) into a constraint parameter, and if so can someone please give an example. Below is the way I've been trying, without success, to get a value based on a key. $m : Map() MyObject(.) from $m['key'] We support MVEL notation for the 'from' keyword. import my.package.MyFact import java.util.Map.Entry rule Find with map when $fact : MyFact($paramMap : paramMap) $myValue : Entry(key == mykey1) from $paramMap Then // Sudo code... use $myValue.getValue() end Paul Ryan Software Architect Product Engineering InfoTrust Group, Inc. [cid:image001.jpg@01C8E764.9D131B00] 500 Discovery Parkway, Suite 200 Superior, CO 80027 Office (303) 627-6528 Fax (303) 666-6711 Email [EMAIL PROTECTED]mailto:[EMAIL PROTECTED] 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. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users inline: image001.jpg___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] DSL expanders for overriding rules question
I've done as suggested and created the feature request as JBRULES-1615. Thanks, -- Paul Ryan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: Wednesday, May 21, 2008 8:09 AM To: Rules Users List Subject: Re: [rules-users] DSL expanders for overriding rules question Paul, I believe eclipse plug-in supports only one expander per DSLR file. In fact, the expander declaration is only used by the eclipse plug-in. If you need to use more than one expander per rule file, you will have to use the API directly. This is probably something to improve in the future. May I ask you please to open a feature request? Kris, can you confirm that this is the case? []s Edson 2008/5/20 Paul Ryan [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]: I have a question about expanders if anyone on might know the answer I'm trying to setup an import scheme for the rules in my system and thought that having expanders be the extension location might work, however when I try to use multiple expanders the eclipse plug-in throws and illegal argument exception. Is this the proper way to include rules and override or is there better way? Thanks in advance, -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli JBoss Drools Core Development Office: +55 11 3529-6000 Mobile: +55 11 9287-5646 JBoss, a division of Red Hat @ www.jboss.comhttp://www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] DSL expanders for overriding rules question
I have a question about expanders if anyone on might know the answer I'm trying to setup an import scheme for the rules in my system and thought that having expanders be the extension location might work, however when I try to use multiple expanders the eclipse plug-in throws and illegal argument exception. Is this the proper way to include rules and override or is there better way? Thanks in advance, -- Paul Ryan ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users