Re: [rules-users] Drools With Spring Framework Problem
I have tried of using the sample coding given the link given by you: But i am getting the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: Operator '40' does not exist for StringEvaluator org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:403) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) My insurance-servlet.xml: beans !-- default handlermapping -- bean id=beanNameUrlMapping class=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping/ bean name=/home.htm class=com.sample.InsuranceController singleton=false property name=ruleBase ref bean=ruleBase/ /property property name=insurBean ref bean=insurance/ /property /bean !-- View Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule engine examples in the Drools in the standalone with the help od drools IDE for eclipse 3.2. And I also tried some example in the Spring Framework,to know how it works. I have tried some examples in IOC, MVC and JDBC in the spring framework. Now, I want to use both Drools and Spring Framework in
Re: [rules-users] exists + normal column constraints - how many times a rule is cal led in the end????
Vlad, exists Person(role == parent) checks if in workingMemory is at least one Person fact having attribute role == parent, in both your examples. Your reasoning is correct: the four facts with role ==child will activate the rule. So, the result for your second example will be the same as the first result, for your list of facts, no matter how you switch the columns. Regards, Oana Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote:Hi, Im not sure my understanding of existential quantifiers is correct. Hopefully, someone can clear it up a bit Providing I have the following fact class: Person(role: parent/child, name) And following facts: 1: parent, John 2: parent, Alice 3: parent, Steve 4: parent, Jane 5: child, Eric 6: child, Rob 7: child, May 8: child, April I expect the rule Rule iterate children if at least one parent is found When exists Person(role == parent) $child: Person(role == child) Then // do smth for each $child if at least one parent is found End To iterate through all child persons (facts 5 through 8), ie the action will be called exactly 4 times. Is this correct? What would happen if I swap the order of the conditions (with parent exists constrain going _after_ child constraint): When $child: Person(role == child) exists Person(role == parent) Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 3.1-M1
The XSD is out of date, it's normally in META-INF dir in drools-compiler. I got stuck at the point of trying to make it work with multi restrictiction connective field constraints work, so if anyone wants to finish that work for me :) Likewise the XML Parser has not yet been updated for any of the new Conditional Elements or other language features. Mark Francesco Campagnola wrote: Hi, I'm searching for a new version of the XSD of Drools, a kind of drools-3.1.xsd with the new operators' definitions (collect, accumulate...). I've seen that the M1 source package still contains the old version of this XSD. I'd like to know if a new version is available (and where i can find it), or if not when is scheduled a new release? Thanks in advance. 2007/2/19, Mark Proctor [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: 3.1-M1 is now avaliable. M1 provides an unstable snapshot release of trunk and the features todate. Please see the Release Notes and Downloads for more information: Release Notes - http://wiki.jboss.org/wiki/Wiki.jsp?page=3.1M1ReleaseNotes http://wiki.jboss.org/wiki/Wiki.jsp?page=3.1M1ReleaseNotes Downloads - http://labs.jboss.com/portal/jbossrules/downloads Happy Drooling The JBoss Rules Team ___ rules-users mailing list rules-users@lists.jboss.org mailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users 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] Drools With Spring Framework Problem
Hi Niyas, This is something I faced yesterday but did not had the time to work on it yet. Basically, 2 problems: 1. Error message is crap... we need to improve that. 2. It should not be raising any error. The error means you have a String attribute you are trying to compare using operators like , , =, =. Example: Person( name 'Edson' ) And I think the above should work but is not working. I will open a JIRA for that. Meanwhile, if you need to have such constraint, a workaround is to use a predicate: Person( $n : name, ( $n.compareTo( 'Edson' ) 0 ) ) []s Edson Niyas wrote: I have tried of using the sample coding given the link given by you: But i am getting the following error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: Operator '40' does not exist for StringEvaluator org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:403) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) My insurance-servlet.xml: beans !-- default handlermapping -- bean id=beanNameUrlMapping class=org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping/ bean name=/home.htm class=com.sample.InsuranceController singleton=false property name=ruleBase ref bean=ruleBase/ /property property name=insurBean ref bean=insurance/ /property /bean !-- View Resolver -- bean id=viewResolver class=org.springframework.web.servlet.view.InternalResourceViewResolver property name=prefix value/WEB-INF/jsp//value /property property name=suffix value.jsp/value /property /bean !-- Bean -- bean id=insurance class=com.sample.InsuranceBean/ bean id=ruleBase class=com.sample.RuleBaseBeanFactory property name=drlResourceList list value type=org.springframework.core.io.Resourceclasspath:/com/sample/Approval.drl/value /list /property property name=packageBuilderConfiguration bean class=org.drools.compiler.PackageBuilderConfiguration property name=javaLanguageLevel value=1.5/ /bean /property /bean /beans On 2/19/07, Olenin, Vladimir (MOH) [EMAIL PROTECTED] wrote: Check out 'Spring Modules' subproject - it has a DROOLS integration module. Haven't used it myself yet, so not sure whether it's mature/compatible with most recent release. https://springmodules.dev.java.net/docs/reference/0.7/html/jsr94.html#d0e570 9 https://springmodules.dev.java.net/ Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Niyas Sent: 19 February 2007 09:49 To: rules-users@lists.jboss.org Subject: [rules-users] Drools With Spring Framework Problem Hi all, I am in need of integrating Drools JBoss Rule Engine with Spring Framework. I have tried sample rule
Re: [rules-users] Drools With Spring Framework Problem
Hi Edson, Thanks for your reply. Yes, you are correct and I have changed the operator . But I am getting some other error now. javax.servlet.ServletException: Servlet.init() for servlet insurance threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) root cause org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/home.htm' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Cannot resolve reference to bean 'ruleBase' while setting bean property 'ruleBase'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem; org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:190) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537) org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:186) org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping.initApplicationContext(BeanNameUrlHandlerMapping.java:62) org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:84) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:277) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:395) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
[rules-users] Jar Files Required for Drools?
Hi all, For using Drools Rule Engine, what are the jar are files required? I have used Drools JBoss RUle Engine IDE in Eclispe. Now I want to use it without an IDE. So I want to know what are the required jar files: 1. drools-core.jar 2. drools-compiler.jar 3. drools-decisiontables.jar 4. drools-jsr94.jar The above jar files are enough..any other to be included..? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools With Spring Framework Problem
Niyas, This one seems to be a conflict when using JDT and tomcat. Look at the JBoss Rules wiki that I believe someone posted a solution for that there. []s Edson Niyas wrote: Hi Edson, Thanks for your reply. Yes, you are correct and I have changed the operator . But I am getting some other error now. javax.servlet.ServletException: Servlet.init() for servlet insurance threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595) root cause org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/home.htm' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Cannot resolve reference to bean 'ruleBase' while setting bean property 'ruleBase'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ruleBase' defined in ServletContext resource [/WEB-INF/insurance-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem; org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:190) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:537) org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.registerHandler(AbstractUrlHandlerMapping.java:186) org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping.initApplicationContext(BeanNameUrlHandlerMapping.java:62) org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73) org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:84) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:277) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:395) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:283) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313) org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:306) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:251) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:220) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
Re: [rules-users] Jar Files Required for Drools?
Niyas, It is better to download the binary distribution containing the dependencies too. There are all the jars you may needed. Oana Niyas [EMAIL PROTECTED] wrote: Hi all, For using Drools Rule Engine, what are the jar are files required? I have used Drools JBoss RUle Engine IDE in Eclispe. Now I want to use it without an IDE. So I want to know what are the required jar files: 1. drools-core.jar 2. drools-compiler.jar 3. drools-decisiontables.jar 4. drools-jsr94.jar The above jar files are enough..any other to be included..? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] logical 'not' - is there such a construct?
Hi, I wonder if there is logical 'not' operator (in the meaning of != - 'not equal') which can be applied to the whole rule? Eg: Rule x When ! ( MyObject(aaa == bbb) MyObject2(bbb == aaa) ) Then // do smth End Basically I'm looking for an operator to reverse the evaluation result of the expression in the brackets. The use case: in my system all rules are defined from 'rule passes' prospective, while the application should take some action in case the rule is NOT passed (ie, 'else' case). Any way to do that except reformulating the constraints themselves? Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] logical 'not' - is there such a construct?
Vlad, In 3.1M1 you can write: rule X when not ( MyObject( aaa == bbb ) and MyObject2( bbb == aaa ) ) then // do something end But remember that variables bound inside the not block are not avaible in the consequence for obvious reasons. []s Edson Olenin, Vladimir (MOH) wrote: Hi, I wonder if there is logical ‘not’ operator (in the meaning of “!=” - ‘not equal’) which can be applied to the whole rule? Eg: Rule x When ! ( MyObject(aaa == “bbb”) MyObject2(bbb == “aaa”) ) Then // do smth End Basically I’m looking for an operator to reverse the evaluation result of the expression in the brackets. The use case: in my system all rules are defined from ‘rule passes’ prospective, while the application should take some action in case the rule is NOT passed (ie, ‘else’ case). Any way to do that except reformulating the constraints themselves? Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] logical 'not' - is there such a construct?
So, if used like that, 'not' does not have 'existential' meaning then, but simple 'negation'? I mean, the expression not MyObject(field == 'value') would still mean 'not exists', correct? Would the expression not (MyObject(field == 'value')) mean MyObject(field != 'value') then. In other worlds, all objects OTHER then those matching the constraint? Thanks. Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: 20 February 2007 14:37 To: Rules Users List Subject: Re: [rules-users] logical 'not' - is there such a construct? Vlad, In 3.1M1 you can write: rule X when not ( MyObject( aaa == bbb ) and MyObject2( bbb == aaa ) ) then // do something end But remember that variables bound inside the not block are not avaible in the consequence for obvious reasons. []s Edson Olenin, Vladimir (MOH) wrote: Hi, I wonder if there is logical 'not' operator (in the meaning of != - 'not equal') which can be applied to the whole rule? Eg: Rule x When ! ( MyObject(aaa == bbb) MyObject2(bbb == aaa) ) Then // do smth End Basically I'm looking for an operator to reverse the evaluation result of the expression in the brackets. The use case: in my system all rules are defined from 'rule passes' prospective, while the application should take some action in case the rule is NOT passed (ie, 'else' case). Any way to do that except reformulating the constraints themselves? Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.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] logical 'not' - is there such a construct?
No, the not conditional element is an existential operator, so the meaning is what you expressed in your first example. I thought that was what you were looking for, but apparently it is not. I never heard about any construction capable of doing what you are asking for in a rules engine... maybe someone else can throw some light in... []s Edson Olenin, Vladimir (MOH) wrote: So, if used like that, 'not' does not have 'existential' meaning then, but simple 'negation'? I mean, the expression not MyObject(field == 'value') would still mean 'not exists', correct? Would the expression not (MyObject(field == 'value')) mean MyObject(field != 'value') then. In other worlds, all objects OTHER then those matching the constraint? Thanks. Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: 20 February 2007 14:37 To: Rules Users List Subject: Re: [rules-users] logical 'not' - is there such a construct? Vlad, In 3.1M1 you can write: rule X when not ( MyObject( aaa == bbb ) and MyObject2( bbb == aaa ) ) then // do something end But remember that variables bound inside the not block are not avaible in the consequence for obvious reasons. []s Edson Olenin, Vladimir (MOH) wrote: Hi, I wonder if there is logical 'not' operator (in the meaning of != - 'not equal') which can be applied to the whole rule? Eg: Rule x When ! ( MyObject(aaa == bbb) MyObject2(bbb == aaa) ) Then // do smth End Basically I'm looking for an operator to reverse the evaluation result of the expression in the brackets. The use case: in my system all rules are defined from 'rule passes' prospective, while the application should take some action in case the rule is NOT passed (ie, 'else' case). Any way to do that except reformulating the constraints themselves? Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Janino vs. Eclipse
Marcus Ilgner was heard to exclaim, On 02/20/07 12:34: The biggest difference would be that Janino does not support language level 1.5. That was a big factor for me, but I understood that Eclipse was only usable if you were generating static rules (in the IDE) for later deployment. Now I'm not so sure... -- Dirk Bergstrom [EMAIL PROTECTED] _ Juniper Networks Inc., Computer Geek Tel: 408.745.3182 Fax: 408.745.8905 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] logical 'not' - is there such a construct?
Well, probably to rephrase it, what is the status / thoughts on 'else' construct for rules? Basically global 'logical' not for rules would be the 'else' branch of conditional statement (if DROOLS had one), correct? I've read some postings regarding this shortly after I joined the list (ie, around a month ago). I wonder if that discussion went anywhere To clarify, I do need the _logical_ not, NOT exisitential. So that the constructs with logical 'not' would select an 'inverse' fact tuples, ie, tuples for facts that did not the condition Kind of simple logical statement transformation in boolean algebra (DeMorgan law?...): MyObject( field == 'value' ) and MyObject2( field == 'value' ) --- !( MyObject( field != 'value' ) or MyObject2( field != 'value' ) ) If '!' would mean ALL TUPLES FOR FACTS IN THE RULE XOR SELECTED TUPLES, would the above conditions select the same set of tuples? I assume the engine should just 'expand' any such 'logical not' operands to move it into the coluimn constraints?.. I might be confusing smth though On the second thought for my particular case 'existential' not should work too, so I guess the above is just a possible extention of functionality. It really has nothing to do with the rule engine itself (from what I see), but rather transformation of the logical expressions before they are feeded into the rules engine. Thanks for the answers, Edson. Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: 20 February 2007 16:30 To: Rules Users List Subject: Re: [rules-users] logical 'not' - is there such a construct? No, the not conditional element is an existential operator, so the meaning is what you expressed in your first example. I thought that was what you were looking for, but apparently it is not. I never heard about any construction capable of doing what you are asking for in a rules engine... maybe someone else can throw some light in... []s Edson Olenin, Vladimir (MOH) wrote: So, if used like that, 'not' does not have 'existential' meaning then, but simple 'negation'? I mean, the expression not MyObject(field == 'value') would still mean 'not exists', correct? Would the expression not (MyObject(field == 'value')) mean MyObject(field != 'value') then. In other worlds, all objects OTHER then those matching the constraint? Thanks. Vlad -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli Sent: 20 February 2007 14:37 To: Rules Users List Subject: Re: [rules-users] logical 'not' - is there such a construct? Vlad, In 3.1M1 you can write: rule X when not ( MyObject( aaa == bbb ) and MyObject2( bbb == aaa ) ) then // do something end But remember that variables bound inside the not block are not avaible in the consequence for obvious reasons. []s Edson Olenin, Vladimir (MOH) wrote: Hi, I wonder if there is logical 'not' operator (in the meaning of != - 'not equal') which can be applied to the whole rule? Eg: Rule x When ! ( MyObject(aaa == bbb) MyObject2(bbb == aaa) ) Then // do smth End Basically I'm looking for an operator to reverse the evaluation result of the expression in the brackets. The use case: in my system all rules are defined from 'rule passes' prospective, while the application should take some action in case the rule is NOT passed (ie, 'else' case). Any way to do that except reformulating the constraints themselves? Thanks, Vlad ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3124-6000 Mobile: +55 11 9218-4151 JBoss, a division of Red Hat @ www.jboss.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] More on thread safety of working memory
This horse has been beaten pretty hard (http://thread.gmane.org/gmane.comp.java.drools.user/3557/focus=3585), but I have a newish angle on it. My app has a big collection of business objects (1000 of type X, 10,000 of type Y, 200 of type Z, etc) asserted into a single working memory. These objects need to be updated from external sources periodically. Because each object type has a different source, I'd like to parallelize the updates in separate threads. Some of the updates involve retraction of expired objects or assertion of new ones, but most are just changing fields on already-asserted objects (all fields have PropertyChangeListener (PCL) support). I think that using a SynchronisedWorkingMemory will handle the assert/retract updates. Will it be happy in the face of PCL changes as well, or do I need to do something more? -- Dirk Bergstrom [EMAIL PROTECTED] _ Juniper Networks Inc., Computer Geek Tel: 408.745.3182 Fax: 408.745.8905 ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] query question
Can a query in a rules file be used in the LHS of another rule? -- Kevin J. Schmidt [EMAIL PROTECTED] In all affairs it's a healthy thing now and then to hang a question mark on the things you have long taken for granted. -Bertrand Russell ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] query question
no Kevin J. Schmidt wrote: Can a query in a rules file be used in the LHS of another rule? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Need Help for jbossruleseclipse Configuration
org.drools.ide_1.0.0.jar ? This seems to be an old version. I would expect to see org.drools.ide_3.0.5 there. But best way to install the JBoss Rules IDE into eclipse is by using the update site and not download the plugin manually, as explained in http://labs.jboss.com/file-access/default/members/jbossrules/freezone/docs/3.0.5/html/ch02.html#d0e953. That will put all the necessary files (including all JBoss Rules jars and their dependencies) in the right location. Notice that you should install GEF before using the update site as the update site will check whether an appropriate version of GEF has been installed before installing JBoss Rules IDE. You only need ant or svn etc. if you want to build from sources. After doing that, you should be able to create a sample project and execute that. If you still keep get errors when compiling the sample HelloWorld project, could you please explain which errors those are exactly? Kris - Original Message - From: Niloy Debnath To: rules-users@lists.jboss.org Sent: Tuesday, February 20, 2007 6:17 AM Subject: [rules-users] Need Help for jbossruleseclipse Configuration hi, i'm doing a project using jbossrules eclipse on fedora core 4 platform.i've tried to configure jboss eclipse.the steps i've followed is written below, 1.install j2sdk-1_4_2_13-linux-i586-rpm.bin and set the classpath 2.extract jbossrules-3.0.5-bin-withdeps.zip 3.extract eclipse-SDK-3.2.1-linux-gtk.tar.gz 4.put the org.drools.ide_1.0.0.jar plugin into the plugin directory of eclipse 5.put the GEF plugins into the eclipse plugin directory now i've gone to eclipse directory and run the eclipse using ./eclipse.it ran but when i tried to test the sample programs it compiled and threw errors.i've found the sample programs in the file named jbossrules-examples-3.0.5-src.zip. and put it into the default workspace of eclipse.i've followed the Drools Documentation 3.0.5 (Mark Proctor,Michael Neale,Peter Lin,Michael Frandsen) during the installation process. please guide me what i'll do now.i've noted one thing in the documentation that i need to have these tools installed,Eclipse 3.2,Subversion Client 1.3,Ant 1.6.i've only installed eclipse.do i need to install other two things?if yes then how do i install configure that? moreover please tell me whether i am going right way or not. thanking you, Niloy Debnath Here's a new way to find what you're looking for - Yahoo! Answers ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users