[rules-users] Drools Guvnor 5.4.0.Final running on JBoss AS 6.1
Hi all, I am running Drools Guvnor 5.4.0.Final on JBoss AS 6.1. I removed some libraries that were conflicting, and I also removed from the web.xml, the BeanManager resource env. After those changes, the app starts up, but it fails when bootstrapping Weld, when wrapping injection target to IdentityImpl class, failing on unsatisfied dependencies. The reported error varies, as sometimes the unsatisfied dependencies are [HttpSession] , [Credentials] or [PermissionMapper]. I am stuck on this error, any input is much appreciated. The detailed error message: Deployment vfs:///myPath/jboss-6.1.0.Final/server/default/deploy/myAPP.war_WeldBootstrapBean is in error due to the following reason(s): org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [HttpSession] with qualifiers [@Default] at injection point [[field] @Inject org.jboss.seam.security.IdentityImpl.session], **ERROR** Deployment java:global/cdi/myAPP/myAPP/BeanManager is in error due to the following reason(s): ** NOT FOUND Depends on 'java:global/cdi/myAPP/myAPP/BeanManager' ** or Deployment vfs:///myPath/jboss-6.1.0.Final/server/default/deploy/myAPP.war_WeldBootstrapBean is in error due to the following reason(s): org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [PermissionMapper] with qualifiers [@Default] at injection point [[field] @Inject private org.jboss.seam.security.IdentityImpl.permissionMapper], **ERROR** Deployment java:global/cdi/myAPP/myAPP/BeanManager is in error due to the following reason(s): ** NOT FOUND Depends on 'java:global/cdi/myAPP/myAPP/BeanManager' ** Excluded libraries from war: xml-apis-1.3.04.ja xmlParserAPIs-2.6.2.jar jsf-api-1.2.jar jta-1.1.jar jaxen-1.1.1.jar jaxb-xjc-2.2.5.jar weld-servlet-core-1.1.6.Final.jar weld-api-1.1.Final.jar weld-core-1.1.6.Final.jar weld-spi-1.1.Final.jar xercesImpl-2.9.1.jar dom4j-1.6.1.jar cdi-api-1.0-SP4.jar javassist-3.14.0-GA.jar javax.inject-1.jar jboss-interceptors-api_1.1_spec-1.0.0.Beta1.jar jsr250-api-1.0.jar persistence-api-1.0.jar shrinkwrap-api-1.0.0-cr-1.jar shrinkwrap-impl-base-1.0.0-cr-1.jar shrinkwrap-spi-1.0.0-cr-1.jar Thanks,Patricia___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Error in adding BRL in Guvnor
I have created a Model named applicationHealth which contain a class “com.xyz.rims.model.Application” on Guvnor. Also created a Business rule asset named ‘ApplicationHealthRule’ which uses ‘Application’. I have created a business rule task in a BPMN2 process and gave the ‘ruleflow-group’ as same as a Business rule assets . kbuilder.add(ResourceFactory.newUrlResource(DROOLS_COMMON_URL+ApplicationHealthRule/binary), ResourceType.BRL); I used the above code to add the resource to kbuilder The error I get is: [Unable to resolve ObjectType 'Application' : [Rule name='ApplicationHealthRule'] ] -- View this message in context: http://drools.46999.n3.nabble.com/Error-in-adding-BRL-in-Guvnor-tp4020555.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error in adding BRL in Guvnor
If you are using the binary version of your package you should use ResourceType.PKG. Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Tue, Oct 30, 2012 at 7:15 AM, vargheseps varghesep...@gmail.com wrote: I have created a Model named applicationHealth which contain a class “com.xyz.rims.model.Application” on Guvnor. Also created a Business rule asset named ‘ApplicationHealthRule’ which uses ‘Application’. I have created a business rule task in a BPMN2 process and gave the ‘ruleflow-group’ as same as a Business rule assets . kbuilder.add(ResourceFactory.newUrlResource(DROOLS_COMMON_URL+ApplicationHealthRule/binary), ResourceType.BRL); I used the above code to add the resource to kbuilder The error I get is: [Unable to resolve ObjectType 'Application' : [Rule name='ApplicationHealthRule'] ] -- View this message in context: http://drools.46999.n3.nabble.com/Error-in-adding-BRL-in-Guvnor-tp4020555.html Sent from the Drools: User forum 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] Drool rules vs java code, effiency
Hello, This is what i think (has to be confirmed from specialist) Every thing you do in Drools you can do it as well in Java. But if you have a modification on your java code, you have to modify, then compile and deploy. contrary to the Drl rules which are interpreted, so after modification you don't need to do any thing just save your modification. So in the case of drools you have some flexibility which means that the rules can be managed directly by the decider and not the developer. regards, Cheikh Le 29/10/2012 23:57, kina06 a écrit : Please don't ignore this question as routine, did google and read posting, didn't get satisfying answer, hope you guys can help. I have seen some drool rules in our company, I know drools provide declarative rules, easy to modify etc etc, but I see it does need some programming knowledge, so why not put all your rule logic into Java code, what is drools doing different can't be implemented in Java a separate package (like your logic package). Except losing flexibility of modify code/logic in text file I don't see much benefit. Please help me understand, whats the major benefit of drools rules that can't be done in Java with same set of concise code. -- View this message in context: http://drools.46999.n3.nabble.com/Drool-rules-vs-java-code-effiency-tp4020549.html Sent from the Drools: User forum 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] Error in adding BRL in Guvnor
when i use ResourceType.PKG i got the following exception when trying to add to kbuilder java.lang.RuntimeException: java.io.StreamCorruptedException: invalid stream header: 3C72756C In my project when i created the Application not inside any package(ie in src) every thing is working fine. but when i use com.xyz.rims.model.Application ,resource is added to kbuilder with the error [Unable to resolve ObjectType 'Application' : [Rule name='ApplicationHealthRule'] ] In model that has been uploaded i used the package structure in both the above cases can any one help Varghese p s -- View this message in context: http://drools.46999.n3.nabble.com/Error-in-adding-BRL-in-Guvnor-tp4020555p4020559.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drool rules vs java code, effiency
See below. On 30/10/2012, Esteban Aliverti esteban.alive...@gmail.com wrote: For simple validation rules the main benefit of using drools is the decoupling of your business logic from your application. Another benefit is the power of DRL language. For example, implementing the 'exists', 'collect', 'accumulate', 'from' etc. behavior in plain java is not a trivial task. This enumeration omits the most important feature available in a rule's condition: the dynamic creations of all Cartesian products of facts matching the constraints. Example: $p: Person( age = 60 ) Car( owner == $p ) This finds all cars owned by persons over 60, which relieves you from the task of writing loops to determine all matching combinations, which can become quite cumbersome with increasing complexity. In Drools you already have all that power and you can create really complex rules with just a few lines of DRL. For more complex scenarios, you can use Drools for: - make inference (impossible to do in java without implementing some kind of inference engine). - use temporal patterns in your rules. - Use TMS - more... There is the option of creating a domain specific language on top of DRL, which is one way of making your business logic intellegible to non-programmers, so that they can at least understand what's going on. -W Best Regards, Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Tue, Oct 30, 2012 at 9:43 AM, cheikh dhib dhib.che...@gmail.com wrote: Hello, This is what i think (has to be confirmed from specialist) Every thing you do in Drools you can do it as well in Java. But if you have a modification on your java code, you have to modify, then compile and deploy. contrary to the Drl rules which are interpreted, so after modification you don't need to do any thing just save your modification. So in the case of drools you have some flexibility which means that the rules can be managed directly by the decider and not the developer. regards, Cheikh Le 29/10/2012 23:57, kina06 a écrit : Please don't ignore this question as routine, did google and read posting, didn't get satisfying answer, hope you guys can help. I have seen some drool rules in our company, I know drools provide declarative rules, easy to modify etc etc, but I see it does need some programming knowledge, so why not put all your rule logic into Java code, what is drools doing different can't be implemented in Java a separate package (like your logic package). Except losing flexibility of modify code/logic in text file I don't see much benefit. Please help me understand, whats the major benefit of drools rules that can't be done in Java with same set of concise code. -- View this message in context: http://drools.46999.n3.nabble.com/Drool-rules-vs-java-code-effiency-tp4020549.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
I tried adding modify() and modify(account), both are failing, can someone help me fix this. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020568.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor 5.4.Final can't save BPMN process imported from 5.3 repo
Not sure what else i should have upgraded. I thought i could just export the existing repo and reimport it. I decided to recreate things in 5.4 since i didn't have that much in there. But when i tried to import my process from eclipse i'm getting this warning : not sure what is going on. I did upgrade the designer to 2.3 as well, not sure if that is causing it. Thanks 09:48:01,962 INFO [org.drools.guvnor.server.files.AuthorizationHeaderChecker] (http--0.0.0.0-8080-5) authenticated for rest api 09:48:01,962 ERROR [org.drools.repository.RulesRepository] (http--0.0.0.0-8080-5) Caught Exception: javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed. at org.apache.jackrabbit.core.session.SessionState.checkAlive(SessionState.java:121) [jackrabbit-core-2.2.8.jar:2.2.8] at org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:366) [jackrabbit-core-2.2.8.jar:2.2.8] at org.apache.jackrabbit.core.SessionImpl.getRootNode(SessionImpl.java:715) [jackrabbit-core-2.2.8.jar:2.2.8] at org.drools.repository.RulesRepository.getAreaNode(RulesRepository.java:213) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.repository.RulesRepository.loadModule(RulesRepository.java:429) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.repository.RulesRepository.loadGlobalArea(RulesRepository.java:681) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.loadGlobalAreaFromRepository(WebDAVImpl.java:912) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.handleReadOnlyGlobalAreaPackages(WebDAVImpl.java:222) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.getChildrenNames(WebDAVImpl.java:196) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl$Proxy$_$$_WeldClientProxy.getChildrenNames(WebDAVImpl$Proxy$_$$_WeldClientProxy.java) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at net.sf.webdav.methods.DoPropfind.recursiveParseProperties(DoPropfind.java:217) [webdav-servlet-2.0.jar:] at net.sf.webdav.methods.DoPropfind.execute(DoPropfind.java:165) [webdav-servlet-2.0.jar:] at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128) [webdav-servlet-2.0.jar:] at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:73) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.1.Final.jar:3.1.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.1.Final.jar:3.1.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.10.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:] at
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
On 30/10/2012, kina06 reach...@gmail.com wrote: I tried adding modify() and modify(account), both are failing, can someone help me fix this. What, exactly, do you have in your rule so it fails? Did you read the Expert documentation? modify() is certainly incorrect, -W -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020568.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
Ok, I fixed my issue, by adding no-loop tag to the rule and using update(account) as last line in then clause. I don't know what's the consequence of using no-loop, if I don't put that but just use update it loop infinitely. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020570.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
See the Expert manual: modify, update, no-loop - it's all there... -W On 30/10/2012, kina06 reach...@gmail.com wrote: Ok, I fixed my issue, by adding no-loop tag to the rule and using update(account) as last line in then clause. I don't know what's the consequence of using no-loop, if I don't put that but just use update it loop infinitely. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020570.html Sent from the Drools: User forum 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] Guvnor 5.4.Final can't save BPMN process imported from 5.3 repo
Fixed the other issue with importing from eclipse. Is there documentation somewhere on how to properly upgrade from 5.3 to 5.4? I thought that maybe i would be able to recreate my packages and import the process from eclipse but that gave the same error above. Not sure Maybe you did not upgrade all the code including property files ? meant. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-5-4-Final-can-t-save-BPMN-process-imported-from-5-3-repo-tp4020545p4020572.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor 5.4.Final can't save BPMN process imported from 5.3 repo
I don't see any Designer specific error(s) in your provided logs. This seems like a possible issue with Guvnor and the Drools Eclipse plugin. Will deffer to experts in that field to provide more info. Just FYI, with jBPM easiest way to get started is to use the jBPM installer which bundles the AS, Guvnor, Designer, jBPM Console, and Eclipse (with proper plugins). With the new release around the corner you could either wait for that or use the latest jBPM release bits on sourceforge. HTH On 10/30/12 9:53 AM, mpgong wrote: Not sure what else i should have upgraded. I thought i could just export the existing repo and reimport it. I decided to recreate things in 5.4 since i didn't have that much in there. But when i tried to import my process from eclipse i'm getting this warning : not sure what is going on. I did upgrade the designer to 2.3 as well, not sure if that is causing it. Thanks 09:48:01,962 INFO [org.drools.guvnor.server.files.AuthorizationHeaderChecker] (http--0.0.0.0-8080-5) authenticated for rest api 09:48:01,962 ERROR [org.drools.repository.RulesRepository] (http--0.0.0.0-8080-5) Caught Exception: javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed. at org.apache.jackrabbit.core.session.SessionState.checkAlive(SessionState.java:121) [jackrabbit-core-2.2.8.jar:2.2.8] at org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:366) [jackrabbit-core-2.2.8.jar:2.2.8] at org.apache.jackrabbit.core.SessionImpl.getRootNode(SessionImpl.java:715) [jackrabbit-core-2.2.8.jar:2.2.8] at org.drools.repository.RulesRepository.getAreaNode(RulesRepository.java:213) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.repository.RulesRepository.loadModule(RulesRepository.java:429) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.repository.RulesRepository.loadGlobalArea(RulesRepository.java:681) [guvnor-repository-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.loadGlobalAreaFromRepository(WebDAVImpl.java:912) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.handleReadOnlyGlobalAreaPackages(WebDAVImpl.java:222) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl.getChildrenNames(WebDAVImpl.java:196) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at org.drools.guvnor.server.files.WebDAVImpl$Proxy$_$$_WeldClientProxy.getChildrenNames(WebDAVImpl$Proxy$_$$_WeldClientProxy.java) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at net.sf.webdav.methods.DoPropfind.recursiveParseProperties(DoPropfind.java:217) [webdav-servlet-2.0.jar:] at net.sf.webdav.methods.DoPropfind.execute(DoPropfind.java:165) [webdav-servlet-2.0.jar:] at net.sf.webdav.WebDavServletBean.service(WebDavServletBean.java:128) [webdav-servlet-2.0.jar:] at org.drools.guvnor.server.files.WebdavServlet.service(WebdavServlet.java:73) [guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.1.Final.jar:3.1.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.1.Final.jar:3.1.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.10.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:] at
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
How do I let the Drools know the changes made so the next rule has the changes. Can I use update function, can you share some links where I can I read on this. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020575.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
http://docs.jboss.org/drools/release/5.5.0.CR1/drools-expert-docs/html_single/index.html 4.8.4. The Right Hand Side (then) -W On 30/10/2012, kina06 reach...@gmail.com wrote: How do I let the Drools know the changes made so the next rule has the changes. Can I use update function, can you share some links where I can I read on this. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020575.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
Does update(account) causes all rules to be rerun? I don't want that, at the same time I don't want to use modify as it's not very easy to use, I have several rules that I will hve to change I like the option of coding like the following and then one function call that will notify the rule engine that this object is modified so next rule has latest changes. account.setSomeField('); account.setStatus(''); account.setExpiry(xyxCalss.getExpiryDate()); NOW call a function to notify that account is changed. How can I do it? -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020577.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
This looks like such a basic functionality and I'm not getting any help. I can't seem to understand why update function keep calling the function, is there no way to let drools know that I modifed an object values so it gives me the updated object in next rule. Please help, this is such a basic step without which I cna't proceed any further. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020578.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
This is a list for support of the drools product, but there is some expectation that you will figure out some basic functionality by reading the docs and putting some thought into it. :) In general, though, the next rule is whatever rule matches the objects currently in working memory. If you don't want a given rule to fire you should make sure that the objects altered no longer match it after they are changed. In your original example the Account object matched in Rule1 has no conditions on it at all, meaning any Account in working memory will be matched, so it's no wonder that it's being matched repeatedly. Also, I'm puzzled by your calls to StringUtils.equals() in the rule conditions. Did you not try this? account : Account(accountStatus == NEW) Again, in the docs, this is the recommended way to test object properties. From: kina06 reach...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, October 30, 2012 10:12 AM Subject: Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue This looks like such a basic functionality and I'm not getting any help. I can't seem to understand why update function keep calling the function, is there no way to let drools know that I modifed an object values so it gives me the updated object in next rule. Please help, this is such a basic step without which I cna't proceed any further. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020578.html Sent from the Drools: User forum 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] Calling Technical rule assets in Guvnor
Are you sure the AgendaFilter is not causing the Technical Rule to be excluded? On 29 October 2012 12:17, Manasi manasi.a.da...@capgemini.com wrote: Hi, How to call Technical rule assets stored in Guvnor from Java application? Currently I have one drl rule which is stored in Technical rule assets section. But I am not able to call it from my Java application. I am using following code to call my rules stored in Guvnor : UrlResource urlResource = (UrlResource) ResourceFactory.newUrlResource( http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/GuiKontrolKiss.FeltKnapRestriktionerKundeMedAnl/LATEST ); urlResource .setBasicAuthentication(enabled); urlResource.setUsername(admin); urlResource.setPassword(admin); urlResource.setResourceType(ResourceType.PKG); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); try { kbuilder.add(ResourceFactory.newInputStreamResource(urlResource .getInputStream()), ResourceType.PKG); } catch (IOException e) { e.printStackTrace(); } KnowledgeBase kbase = kbuilder.newKnowledgeBase(); // create session StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession(); NyssCaseSO caseSO = droolsRequest.getNyssCaseSO(); NyssCaseStateSO caseState = caseSO.getNyssCaseStateSO(); NyssOfferSO offerSO = droolsRequest.getNyssOfferSO(); session.insert(caseSO); session.insert(offerSO); session.insert(caseState); AgendaFilter filter = new AgendaFilter() { public boolean accept(Activation activation) { if (activation.getRule().getName().contains(testDrl)) { return true; } return false; } }; session.fireAllRules(filter); for (Object o : session.getObjects()) { if (o instanceof ResultSO) { ResultSO resultSO = (ResultSO) o; reply.setResultSO(resultSO); } } session.dispose(); With above I am able to call my rules stored in *Business rule assets* section. Thanks, Manasi -- View this message in context: http://drools.46999.n3.nabble.com/Calling-Technical-rule-assets-in-Guvnor-tp4020537.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
Yes I tried account : Account(accountStatus == NEW) In above posts it's mentioned that I have to use modify or update, when use that it fires rules recursively without stopping. Will it possible to test my code, I can provide the Account class code as well it's just two fields in it. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020581.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
Identify the requirements for changing your data. For instance, what *exactly* is the state of an Account fact x when it should be subject to x.setAccountStatus( PENDING ); Any value of accountStatus? All values *except* PENDING? null? ...? Make sure to constrain Account() in this and any other rule by adding the correct boolean expression between the parens. modify( x ){ set...(...), set...(...) } is the preferred way of notifying the Drools Engine that a fact has changed and all rules potentially referring to this fact need to be reconsidered; the fact's history is irrelevant. x.set...(...); x.set...(...); update( x ); is essentially the same. Using salience is (usually) the wrong approach, as is no-loop, which will avoid only on-the-spot reactivation - you can still loop over two or more rules. -W On 30 October 2012 17:39, kina06 reach...@gmail.com wrote: Yes I tried account : Account(accountStatus == NEW) In above posts it's mentioned that I have to use modify or update, when use that it fires rules recursively without stopping. Will it possible to test my code, I can provide the Account class code as well it's just two fields in it. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020581.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
You can stop the recursive firing by 1) having conditions in the rules that stop recursion, (similar to a stop condition in a for loop) and 2) using update or modify to tell the rules engine that the properties have changed. From: kina06 reach...@gmail.com To: rules-users@lists.jboss.org Sent: Tuesday, October 30, 2012 11:39 AM Subject: Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue Yes I tried account : Account(accountStatus == NEW) In above posts it's mentioned that I have to use modify or update, when use that it fires rules recursively without stopping. Will it possible to test my code, I can provide the Account class code as well it's just two fields in it. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020581.html Sent from the Drools: User forum 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] Field value is different when and then section, very strange. Is it mvel vs java issue
Code put in this posting is just a sample code I have put together to test this functionality. So modify/update will cause all rules to rerun, in that case I need to make sure that each rule is atomic and be idempotentn, i.e. to be able run the rules n times still no same consequence. What's drools.halt() used for, does it halt the rule process for that fact or for all facts in teh session? -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020585.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Adding custom metadata fields in guvnor
Can someone answer this please? Is this possible at all? -- View this message in context: http://drools.46999.n3.nabble.com/Adding-custom-metadata-fields-in-guvnor-tp4020546p4020586.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
When an object is insert in the working memory, it will be matched against all rules: some of them will become active, because the logic expressed in there applies to your fact, some others will not. So, Wolfgang has pointed out an important detail: make sure that there is a strong logic correlation (implication) between the conditions in the LHS and the actions in the RHS, so that you don't execute unwanted actions. Given the fact that evaluation and execution take place in two different stages (see Esteban's email for details), a change in the object's status MAY invalidate the conditions, but the engine needs to know about that: by the time a rule is executed, it won't go back and double-check the conditions unless told so. So (citing Greg this time): if your logic is sound, and you apply modify appropriately, you should not get into a loop - or, if you do get into a loop, it's because it's necessarily imposed by the application logic (I'm assuming that there are other external ways to control the loop termination), for example: rule controlled loop when $x : X( $n : val 10 ) then modify ($x) { setVal( $n + 1 ); } end as opposed to: rule loop when $x : X( $n : val ) then modify ($x) { setVal( $n + 1 ); } end rule breaker salience 10 when $x : X( val 10 ) then retract( $x ); end This said, there are cases when your same fact is shared between two separate contexts: rule One of rules dealing with age when $p : Person( $a : age ) $b : Birthday( person == $p ) then modify ($p) { setAge( $a+1 ); } end rule One of rules dealing with salary when $p : Person( $s : salary 100 ) then modify ($p) { setAge( $a+1 ); } end Here, it's not so evident which conditions should be added to prevent unwanted interaction. Or, even if you could, it would not be the best approach to mix the two business logics... In this case, there is a feature called *@propertyReactive* which I strongly invite you to look up in the manual AFTER you're feeling completely comfortable with the basic behaviour. Best Davide p.a. drools.halt is only used in combination with fireUnitlHalt(), which means that the engine will not wait for an explicit command to fire the active rules. It's a global behaviour that shuts down the engine, so it's not recommended for loop control. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020587.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Field value is different when and then section, very strange. Is it mvel vs java issue
Davide, Thanks a bunch!! /When an object is insert in the working memory, it will be matched against all rules: some of them will become active, because the logic expressed in there applies to your fact, some others will not. So, Wolfgang has pointed out an important detail: make sure that there is a strong logic correlation (implication) between the conditions in the LHS and the actions in the RHS, so that you don't execute unwanted actions. Given the fact that evaluation and execution take place in two different stages (see Esteban's email for details), a change in the object's status MAY invalidate the conditions, but the engine needs to know about that: by the time a rule is executed, it won't go back and double-check the conditions unless told so. / Yes above information is very valuable, that evaluation and execution is done in two steps/stages, I feel this understanding is very critical, now I see why an update is necessary to let the process know that it has reevaulate rules, but at the same token I should be careful with my when condition, it should be very specific. /there are cases when your same fact is shared between two separate contexts/ Yes, my rules fall under this category. Thank you all!! All I'm trying to do is understand how it works rather than just get a solution and move on. -- View this message in context: http://drools.46999.n3.nabble.com/Field-value-is-different-when-and-then-section-very-strange-Is-it-mvel-vs-java-issue-tp4020550p4020588.html Sent from the Drools: User forum 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] Noob desperately needing help
So, we have a massive web-based application with a rules engine powered by drools 4.0.7...I have a time-based rule that fires, executes about 80% of the java code, and then just stops. No error, no exception, no nothing...it just stops. Until I restart the node, all rules processing is suspended. I've let this process run for 24 hours without intervention, but it really is hung. And I know it's not in a loop, as I'm outputting console messages, and I know the exact line that the app is hanging on. I have tried upgrading to drools 5.4, but we didn't write the kernel of the rules engine, and I'm not really in the mood to deal with re-writing it, unless I absolutely have to. This is the first time I've ever seen anything like this, and this app has been running for 4 years with no rules-engine issues. We use it everywherewe are an EMS research organization supporting 3 states, and the application uses the rules engine to determine state-based EMS logic. We also use it as a timing trigger to email notifications to various EMS personnel to notify them of hospital facility closings, bed availability, etc. I have absolutely no idea what the problem is, or how to present it to the mailing list users in a way that might identify what the issue really is...so anyone who is game to help, ask me questions, and I'll answer them as best I can. Thanks for anyone interested in helping debug this issue Paul Cooper Developer EMS Performance Improvement Center Chapel Hill, NC -- View this message in context: http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Noob desperately needing help
I will provide some code, however: The rule that fails The runNeedleChestDecompressionReport method: And the method in the zip utility that fails (I'm using zip4j, as I need to password-protect the zip file): One additional useful pointif I remove the compression call (in other words, I skip the call to compress the file and just send the attachment as a CSV file, it works fine, and the rule completes. -- View this message in context: http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020590.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Noob desperately needing help
Code posting failif you want to help, I guess go to the mailing list web site and read the codesigh -- View this message in context: http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020591.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Noob desperately needing help
From your description, it does not seem a rule engine issue... Have you tried reproducing the problem outside the rule engine? I.e. invoking the ZipUtil in a more traditional context? And does it get stuck with ANY bytearray or just with that one particular input? -- View this message in context: http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020592.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Error in adding BRL in Guvnor
A very Thanks for the replay as i was able to proceed... As you said earlier whwn i gave kbuilder.add(ResourceFactory.newUrlResource(ip:port/drools-guvnor/rest/packages/RulesAnd ModelPackage/binary/,ResourceType.PKG); every thing works fine. But if i gave package as whole to kbuilder.add(), and if the package contains any assets which is corrupted/has errors then the kbuilder will have errors. so is there any solution other than adding the all package.. Regards Varghese p s -- View this message in context: http://drools.46999.n3.nabble.com/Error-in-adding-BRL-in-Guvnor-tp4020555p4020593.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Adding custom metadata fields in guvnor
On 2012/10/30 6:39, sguruprasanna wrote: Is it possible to add custom meta data fields in guvnor? Majority of our rules are EDI rules. So I was wondering if it is possible to have metadata fields to contain information like Trading partner name, or EDI format (820, 315 etc), etc so that the business users would be able to search for any EDI 820 rules, or any rules for tradingpartner XYZ etc.. There were talks to support custom metadata In Guvnor, however such feature has not been put on the to-do-list yet. You may want to create a feature request through Jira and vote for it ;-) Cheers, Jervis Please let me know. Thanks Guru -- View this message in context: http://drools.46999.n3.nabble.com/Adding-custom-metadata-fields-in-guvnor-tp4020546.html Sent from the Drools: User forum 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