[rules-users] Error while executing business Rule
Hi friends, Some times i gets the error while executing rules so after that Rules accross entire screen stops working .. So can anyone tell me what can be the cause why it becomes unstable after that. Thanks Puneet ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error while executing business Rule
but after that error my rules on none of the screens work why so On 7/15/10, Swindells, Thomas tswinde...@nds.com wrote: Your rules are probably written wrong, or your application, or you have a dodgy computer, or you have a race condition, or it is doing exactly what it should be doing and your expectations are wrong. There’s also possibly a small chance that there is a bug in drools but with absolutely no information about what the problem is or what you are doing I’d be inclined to check all the other options first. *From:* rules-users-boun...@lists.jboss.org [mailto: rules-users-boun...@lists.jboss.org] *On Behalf Of *Puneet duggal *Sent:* 15 July 2010 14:42 *To:* Rules Users List *Subject:* [rules-users] Error while executing business Rule Hi friends, Some times i gets the error while executing rules so after that Rules accross entire screen stops working .. So can anyone tell me what can be the cause why it becomes unstable after that. Thanks Puneet -- ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ 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] error while executing business rules
@ friends, any solution for my problem ?? org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] at org.drools.base.ValueType.determineValueType(ValueType.java:222) at org.drools.base.ClassObjectType.init(ClassObjectType.java:56) On 5/18/10, Puneet duggal duggalpu...@gmail.com wrote: @ wolfgang, com.fpl.dsm.busrules.parameters.Para_568 is my fact class or my getter setter class On 5/17/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: From the stack trace: com.fpl.dsm.busrules.parameters.Para_568 Maybe this is a hint which rule is causing the problem. -W 2010/5/17 Puneet duggal duggalpu...@gmail.com drool 4 , it was provided to us so we have to use it any thing new in drool5 that can help much ? i dont know which rue is giving error because there are 60 rules and i dnt know how to debug bcz i m having a web application which loads rules from database. do u know any way to know why its giving error?? On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Any reason why you are using Drools 4? Try to figure out which rule is failing and post it here. I have never used Drools 4. I started from V5. 2010/5/17 Puneet duggal duggalpu...@gmail.com @ esteban, i am using drools-compiler-4.0.7.jar i dont know which rule is exactlly giving the error but while executing i am getting this error Any idea ? [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] at org.drools.base.ValueType.determineValueType(ValueType.java:222) at org.drools.base.ClassObjectType.init(ClassObjectType.java:56) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167) at com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261) at com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304) at com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292) at com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136
[rules-users] error while executing business rules
hi friends , I am getting the error while executing the business rule [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] what this mean? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] error while executing business rules
@ esteban, i am using drools-compiler-4.0.7.jar i dont know which rule is exactlly giving the error but while executing i am getting this error Any idea ? [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] at org.drools.base.ValueType.determineValueType(ValueType.java:222) at org.drools.base.ClassObjectType.init(ClassObjectType.java:56) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167) at com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261) at com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304) at com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292) at com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Try to be a little more specific. Which version of drools are you using? How your rule looks like? What are you trying to do? Best, 2010/5/17 Puneet duggal duggalpu...@gmail.com hi friends , I am getting the error while executing the business rule [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] what this mean? ___ 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
Re: [rules-users] error while executing business rules
drool 4 , it was provided to us so we have to use it any thing new in drool5 that can help much ? i dont know which rue is giving error because there are 60 rules and i dnt know how to debug bcz i m having a web application which loads rules from database. do u know any way to know why its giving error?? On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Any reason why you are using Drools 4? Try to figure out which rule is failing and post it here. I have never used Drools 4. I started from V5. 2010/5/17 Puneet duggal duggalpu...@gmail.com @ esteban, i am using drools-compiler-4.0.7.jar i dont know which rule is exactlly giving the error but while executing i am getting this error Any idea ? [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] at org.drools.base.ValueType.determineValueType(ValueType.java:222) at org.drools.base.ClassObjectType.init(ClassObjectType.java:56) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167) at com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261) at com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304) at com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292) at com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Try to be a little more specific. Which version of drools are you using? How your rule looks like? What are you trying to do? Best, 2010/5/17 Puneet duggal duggalpu...@gmail.com hi friends , I am getting the error while executing the business rule [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568
Re: [rules-users] error while executing business rules
@ wolfgang, com.fpl.dsm.busrules.parameters.Para_568 is my fact class or my getter setter class On 5/17/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: From the stack trace: com.fpl.dsm.busrules.parameters.Para_568 Maybe this is a hint which rule is causing the problem. -W 2010/5/17 Puneet duggal duggalpu...@gmail.com drool 4 , it was provided to us so we have to use it any thing new in drool5 that can help much ? i dont know which rue is giving error because there are 60 rules and i dnt know how to debug bcz i m having a web application which loads rules from database. do u know any way to know why its giving error?? On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Any reason why you are using Drools 4? Try to figure out which rule is failing and post it here. I have never used Drools 4. I started from V5. 2010/5/17 Puneet duggal duggalpu...@gmail.com @ esteban, i am using drools-compiler-4.0.7.jar i dont know which rule is exactlly giving the error but while executing i am getting this error Any idea ? [2010-05-17 09:37:22,419] [FATAL] Error occured while creating rules package for parameter : 568 (BusinessRuleServiceImpl.java:2285) org.drools.RuntimeDroolsException: unable to determine ValueType for Class [class com.fpl.dsm.busrules.parameters.Para_568] at org.drools.base.ValueType.determineValueType(ValueType.java:222) at org.drools.base.ClassObjectType.init(ClassObjectType.java:56) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:130) at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:93) at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69) at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:53) at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:446) at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:304) at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167) at com.fpl.dsm.service.busrules.BusinessRuleServiceImpl.initializeRuleBase(BusinessRuleServiceImpl.java:2261) at com.fpl.dsm.util.BusinessRuleUtils.initializeContext(BusinessRuleUtils.java:2304) at com.fpl.dsm.web.module.action.IncentiveTemplateAction.performLogic(IncentiveTemplateAction.java:292) at com.fpl.dsm.web.base.DSMBaseAction.execute(DSMBaseAction.java:97) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497) On 5/17/10, Esteban Aliverti esteban.alive...@gmail.com wrote: Try to be a little more specific. Which
Re: [rules-users] Problem in update() method
@ Esteban i use update to update my object so that when my next rule is called it should receive the updated value from the previous rule. so using *lock-on-active* will allow me doint that or not ?? On 5/13/10, Esteban Aliverti esteban.alive...@gmail.com wrote: If both rules are in the same agenda group you can use lock-on-active instead of no-loop: http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e3717 Best, 2010/5/13 Greg Barton greg_bar...@yahoo.com It is so because that's what you're telling the system to do. :) The no-loop modifier only prevents a rule's conditions from infinitely re-evaluating the tuples modified by it's own action, not the actions of other rules. So when rule Area_EstimatedRval_test_10-01-09_12-31-14 modifies a Para_2483 it will be reconsidered by the conditions in Area_EstimatesRval4_10-01-09_12-31-14. The only way to prevent Area_EstimatesRval4_10-01-09_12-31-14 from firing again is to craft it's conditions such that they're no longer true. (maybe fid2329 != eid2143 since that contradicts what Area_EstimatedRval_test_10-01-09_12-31-14 does, but I don't know if that makes sense for your rules.) --- On *Wed, 5/12/10, Puneet duggal duggalpu...@gmail.com* wrote: From: Puneet duggal duggalpu...@gmail.com Subject: [rules-users] Problem in update() method To: Rules Users List rules-users@lists.jboss.org Date: Wednesday, May 12, 2010, 10:54 PM hi frnds i am having problem with update() method when i call update method from first rule it calls second rule and goes in infinite loop calling the second method rule again and again why is it so ?? rule Area_EstimatesRval4_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when objectP2483 : Para_2483( (fid2329=0); then objectP2483.setFid2339(objectP2483.getFid2338() *3.1);update(objectP2483); rule Area_EstimatedRval_test_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when objectP2483 : Para_2483( fid23390); then System.out.println(Area_EstimatedRval_test_10-01-09_12-31-14); objectP2483.setFid2339(objectP2483.getEid2143()); update(objectP2483); end -Inline Attachment Follows- ___ rules-users mailing list rules-users@lists.jboss.orghttp://mc/compose?to=rules-us...@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 -- 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] Problem in update() method
hi frnds i am having problem with update() method when i call update method from first rule it calls second rule and goes in infinite loop calling the second method rule again and again why is it so ?? rule Area_EstimatesRval4_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when objectP2483 : Para_2483( (fid2329=0); then objectP2483.setFid2339(objectP2483.getFid2338() *3.1);update(objectP2483); rule Area_EstimatedRval_test_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 5 no-loop true when objectP2483 : Para_2483( fid23390); then System.out.println(Area_EstimatedRval_test_10-01-09_12-31-14); objectP2483.setFid2339(objectP2483.getEid2143()); update(objectP2483); end ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] compilation problem
Friends i am getting this error when i am preparing the package in the business rules. Error 500: org/eclipse/jdt/internal/compiler/CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem; why i am getting this error ? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Insert Fact Speed bottleneck
@ djb , Can u tell me how did u inserted the facts urself ?? Is a just a simple assertion or any thing else ? On 5/5/10, djb dbrownel...@hotmail.com wrote: Hi Drools team, I wrote a Drools application for my company, which evaluates clinical claim processing rules. That is, it checks current medical claims against the patient's historical claims. It appears that 95% of the run time is dedicated to inserting facts, which is presumably when it propagates through the RETE graph, since firing the rules takes no time. But it seems like it's not fast enough. I made a rule template, which by trial and error of moving the conditions around, is optimised. I'm averaging 310ms, and need it to be under 170ms for it to be viable. Is there any not-too-technical guide to optimisation somewhere? (alpha and beta-nodes scare me a bit). Regards, Daniel -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Insert-Fact-Speed-bottleneck-tp778322p778322.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Getting an Error While Executing Rule in Drools 5.0
ohk compiling the rule and storing it its really a good for memory On 5/5/10, miguel machado mls.mach...@gmail.com wrote: @puneet it may be a good ideia memory wise. I'm doing it right now, in order to compile rules just once. _ miguel 2010/5/5 Puneet duggal duggalpu...@gmail.com @ Nikhil, I am not sure weather it a good practice to seralize a package and store it , i am new to it and i am storing the drl files in db . Can we retrive our DRL file after retriving the packge from database.?? On 5/4/10, Nikhil S. Kulkarni nikhil.kulka...@mastek.com wrote: Hi, I have compiled some rules and added it in packages. Then I serialized those packages and stored in database in the form of CLOB data Now I am able to get Packages back from database and loaded it in RuleBase. But while executing Rule, I am getting the following Exception. java.lang.NullPointerException at org.drools.base.ClassFieldReader.getValue(ClassFieldReader.java:91) at org.drools.base.evaluators.EqualityEvaluatorsDefinition$StringEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1962) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:92) at org.drools.rule.OrCompositeRestriction.isAllowed(OrCompositeRestriction.java:25) at org.drools.rule.MultiRestrictionFieldConstraint.isAllowed(MultiRestrictionFieldConstraint.java:97) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:143) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788) at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:201) The similar kind of issue is already logged by someone. Please inform If anyone has an idea about this. Waiting for Reply. Thanks Regards, Nikhil S. Kulkarni MASTEK LTD. Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~ ___ 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 -- To understand what is recursion you must first understand recursion ___ 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 doubt
drlFile = BusinessRuleUtils.createCombinedDrlDocument(id,map.get(id)); PackageBuilder PACKAGE_BUILDER = new PackageBuilder(BUILDER_CONFIGURATION); org.drools.rule.Package pkg = null; PACKAGE_BUILDER .addPackageFromDrl(new StringReader(drlFile)); if (PACKAGE_BUILDER.hasErrors()) { DSM_LOGGER .logFatal(Error has occured while building package. For Parameter ID : + id + Error details are : + PACKAGE_BUILDER.getErrors() .toString()); } else { pkg = PACKAGE_BUILDER.getPackage(); RULEBASE.addPackage(pkg); DSM_LOGGER .logInfo(Package created for Component Prmr ID : + id); } This is the code which i am using at it is not giving any error at the time creating the drl file.it is also not giving any error at the time of calling of execute() method , but rules are not executed . On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Anatoly, please note that I wrote please to Puneet, which is usually not considered as being impolite. Also, kindly note that I asked for more information, which, in my book, is not inconsiderate, as simply deleting Puneet's post might have been. I do resent being called a hater, and I'll let the community judge whether my (admittedly ironic) kidding is hateful. Somehow, however, posters have to be admonished to state their problem more detailed, without people on the list having to waste their time playing guessing games or writing replies begging for more information. -W PS: A you can see now, it was not a question of debugging, and so you have wasted your time on a simple question. :-) On Tue, May 4, 2010 at 5:10 AM, tolitius webaka...@gmail.com wrote: @Wolfgang, No need to be a hater Wolfgang, the question is simple. I agree, examples would be helpful, but that is NOT how you grow a friendly community. Community is the biggest problem JBoss has. Why is it so inhumanly difficult to be polite and considerate? /Anatoly -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rules-doubt-tp774023p775029.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rules doubt
@ Wolfgang Laun , i am using just this statement:- javaConf.setCompiler( JavaDialectConfiguration.*JANINO* ); I dont know the exact use of this statement .I am not using the mvel , i tried to google abt it but couldnt find the use of this ... can u through some light on this. Thanks On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Actually, this kind of error isn't discovered by the Drools DRL compiler; it would be flagged by the Java compiler. (You can verify: if you make the same error in Java code, you'll get that error message.) But if you are using dialect mvel (are you?), this is not flagged as an error, and it would silently convert the Double to a String, and set fid31003 to 497.0. Is this what keeps your other rules from firing, i.e., the excess .0? I suggest that you do not use mvel unless there is a compelling reason (in other rules). Even then, you might restrict use mvel to those rules where it is really necessary. -W 2010/5/4 Puneet duggal duggalpu...@gmail.com drlFile = BusinessRuleUtils.createCombinedDrlDocument(id,map.get(id)); PackageBuilder PACKAGE_BUILDER = new PackageBuilder(BUILDER_CONFIGURATION); org.drools.rule.Package pkg = null; PACKAGE_BUILDER .addPackageFromDrl(new StringReader(drlFile)); if (PACKAGE_BUILDER.hasErrors()) { DSM_LOGGER .logFatal(Error has occured while building package. For Parameter ID : + id + Error details are : + PACKAGE_BUILDER.getErrors() .toString()); } else { pkg = PACKAGE_BUILDER.getPackage(); RULEBASE.addPackage(pkg); DSM_LOGGER .logInfo(Package created for Component Prmr ID : + id); } This is the code which i am using at it is not giving any error at the time creating the drl file.it is also not giving any error at the time of calling of execute() method , but rules are not executed . On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Anatoly, please note that I wrote please to Puneet, which is usually not considered as being impolite. Also, kindly note that I asked for more information, which, in my book, is not inconsiderate, as simply deleting Puneet's post might have been. I do resent being called a hater, and I'll let the community judge whether my (admittedly ironic) kidding is hateful. Somehow, however, posters have to be admonished to state their problem more detailed, without people on the list having to waste their time playing guessing games or writing replies begging for more information. -W PS: A you can see now, it was not a question of debugging, and so you have wasted your time on a simple question. :-) On Tue, May 4, 2010 at 5:10 AM, tolitius webaka...@gmail.com wrote: @Wolfgang, No need to be a hater Wolfgang, the question is simple. I agree, examples would be helpful, but that is NOT how you grow a friendly community. Community is the biggest problem JBoss has. Why is it so inhumanly difficult to be polite and considerate? /Anatoly -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rules-doubt-tp774023p775029.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users 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 doubt
@Wolfgang, thanks a lot for ur wonderful explanation regarding the Dialect... But i still cant find the better way to know the exact error in some cases ,one case i had mentioned in my previous post ...i want to highlight that my drl are loading from database so i cant put break point in drl. appreciate ur help. thanks Puneet On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Here, I've found this for you, a comment from the Drools source file org.drools.rule.builder.dialect.java.JavaDialectConfiguration * There are options to use various flavours of runtime compilers. * Apache JCI is used as the interface to all the runtime compilers. * * You can also use the system property drools.compiler to set the desired compiler. * The valid values are ECLIPSE and JANINO only. * * drools.dialect.java.compiler = ECLIPSE|JANINO * drools.dialect.java.lngLevel = 1.5|1.6 * * The default compiler is Eclipse and the default lngLevel is 1.5. * The lngLevel will attempt to autodiscover your system using the * system property java.version * * The JavaDialectConfiguration will attempt to validate that the specified compiler * is in the classpath, using ClassLoader.loasClass(String). If you intented to * just Janino sa the compiler you must either overload the compiler property before * instantiating this class or the PackageBuilder, or make sure Eclipse is in the * classpath, as Eclipse is the default. Try it without the JANINO setting - it *should* flag the setter with the incompatible types. If you haven't used MVEL so far, I don't see any reason to start now. -W 2010/5/4 Puneet duggal duggalpu...@gmail.com: @ Wolfgang Laun , i am using just this statement:- javaConf.setCompiler( JavaDialectConfiguration.JANINO ); I dont know the exact use of this statement .I am not using the mvel , i tried to google abt it but couldnt find the use of this ... can u through some light on this. Thanks On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Actually, this kind of error isn't discovered by the Drools DRL compiler; it would be flagged by the Java compiler. (You can verify: if you make the same error in Java code, you'll get that error message.) But if you are using dialect mvel (are you?), this is not flagged as an error, and it would silently convert the Double to a String, and set fid31003 to 497.0. Is this what keeps your other rules from firing, i.e., the excess .0? I suggest that you do not use mvel unless there is a compelling reason (in other rules). Even then, you might restrict use mvel to those rules where it is really necessary. -W 2010/5/4 Puneet duggal duggalpu...@gmail.com drlFile = BusinessRuleUtils.createCombinedDrlDocument(id,map.get(id)); PackageBuilder PACKAGE_BUILDER = new PackageBuilder(BUILDER_CONFIGURATION); org.drools.rule.Package pkg = null; PACKAGE_BUILDER .addPackageFromDrl(new StringReader(drlFile)); if (PACKAGE_BUILDER.hasErrors()) { DSM_LOGGER .logFatal(Error has occured while building package. For Parameter ID : + id + Error details are : + PACKAGE_BUILDER.getErrors() .toString()); } else { pkg = PACKAGE_BUILDER.getPackage(); RULEBASE.addPackage(pkg); DSM_LOGGER .logInfo(Package created for Component Prmr ID : + id); } This is the code which i am using at it is not giving any error at the time creating the drl file.it is also not giving any error at the time of calling of execute() method , but rules are not executed . On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Anatoly, please note that I wrote please to Puneet, which is usually not considered as being impolite. Also, kindly note that I asked for more information, which, in my book, is not inconsiderate, as simply deleting Puneet's post might have been. I do resent being called a hater, and I'll let the community judge whether my (admittedly ironic) kidding is hateful. Somehow, however, posters have to be admonished to state their problem more detailed, without people on the list having to waste their time playing guessing games or writing replies begging for more information. -W PS: A you can see now, it was not a question of debugging, and so you have wasted your time on a simple question. :-) On Tue, May 4, 2010 at 5:10 AM, tolitius webaka...@gmail.com wrote: @Wolfgang, No need to be a hater Wolfgang, the question is simple. I agree, examples would be helpful, but that is NOT how you grow a friendly community. Community is the biggest problem JBoss has. Why is it so inhumanly difficult to be polite and considerate? /Anatoly -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rules-doubt
Re: [rules-users] Getting an Error While Executing Rule in Drools 5.0
@ Nikhil, I am not sure weather it a good practice to seralize a package and store it , i am new to it and i am storing the drl files in db . Can we retrive our DRL file after retriving the packge from database.?? On 5/4/10, Nikhil S. Kulkarni nikhil.kulka...@mastek.com wrote: Hi, I have compiled some rules and added it in packages. Then I serialized those packages and stored in database in the form of CLOB data Now I am able to get Packages back from database and loaded it in RuleBase. But while executing Rule, I am getting the following Exception. java.lang.NullPointerException at org.drools.base.ClassFieldReader.getValue(ClassFieldReader.java:91) at org.drools.base.evaluators.EqualityEvaluatorsDefinition$StringEqualEvaluator.evaluate(EqualityEvaluatorsDefinition.java:1962) at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:92) at org.drools.rule.OrCompositeRestriction.isAllowed(OrCompositeRestriction.java:25) at org.drools.rule.MultiRestrictionFieldConstraint.isAllowed(MultiRestrictionFieldConstraint.java:97) at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:143) at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:360) at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:344) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1046) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1001) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:788) at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:201) The similar kind of issue is already logged by someone. Please inform If anyone has an idea about this. Waiting for Reply. Thanks Regards, Nikhil S. Kulkarni MASTEK LTD. Mastek is in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~ ___ 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 doubt
@ friends, This is My rule:- rule Area_SquareFt_01_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when eval(BusinessLogic.gettest(Inside Area_SquareFt_01_10-01-09_12-31-14 executed)) objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SquareFt_01_10-01-09_12-31-14 executed); objectP2483.setFid31003(new Double(497)); end here My 31003 is a String field but i am assigning a Double in it so that should'nt work . But the problem is because of this my all remmaning rules also stoped working. And it took 2 hours to detect it because the execute() method dosent through any error. So how can we detect these situation earlier ,so as to catch the problem early and why my the remm rules stoped woking because on this. On 5/4/10, Wolfgang Laun wolfgang.l...@gmail.com wrote: Would you please turn your screen a little more to the left and enlarge the font so that we can see what mistake you have made and what the error message is? It would also help if we could see when this mistake happens. -W 2010/5/3 Puneet duggal duggalpu...@gmail.com @ friends, i am facing a problem in my business rules and it is :- when i make single mistake in my business rule rest all rules stops working ,why is it so ? and how can i detect which exact business rule is having error thanks Puneet ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rules doubt
This is My rule rule Area_SquareFt_01_10-01-09_12-31-14 date-effective 01-Oct-2009 date-expires 31-Dec-2014 salience 6 no-loop true when eval(BusinessLogic.gettest(Inside Area_SquareFt_01_10-01-09_12-31-14 executed)) objectP2483 : Para_2483( (fid2335==Block) (fid2336==16) ); then System.out.println(Area_SquareFt_01_10-01-09_12-31-14 executed); objectP2483.setFid31003(new Double(497)); end here My 31003 is a String field but i am assigning a Double in it so that should'nt work . But the problem is because of this my all remmaning rules also stoped working. And it took 2 hours to detect it because the execute() method dosent through any error. So how can we detect these situation earlier ,so as to catch the problem early and why my the remm rules stoped woking because on this. On 5/4/10, tolitius webaka...@gmail.com wrote: @Puneet, Examples would be useful to understand what kind of problem you are having. As to Puneet wrote: how can I detect which exact business rule is having error Check out Debugging Rules section of Drools documentation: http://bit.ly/9PRDRJ @Wolfgang, No need to be a hater Wolfgang, the question is simple. I agree, examples would be helpful, but that is NOT how you grow a friendly community. Community is the biggest problem JBoss has. Why is it so inhumanly difficult to be polite and considerate? /Anatoly -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rules-doubt-tp774023p775029.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 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
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
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] 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] 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